Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit fa05468

Browse files
committed
rename OtherAddressSpace to RemoteAddressSpace; NFC
git-svn-id: https://llvm.org/svn/llvm-project/libunwind/trunk@292719 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 52aed8f commit fa05468

File tree

2 files changed

+23
-22
lines changed

2 files changed

+23
-22
lines changed

src/AddressSpace.hpp

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -485,14 +485,14 @@ inline bool LocalAddressSpace::findFunctionName(pint_t addr, char *buf,
485485

486486
#ifdef UNW_REMOTE
487487

488-
/// OtherAddressSpace is used as a template parameter to UnwindCursor when
488+
/// RemoteAddressSpace is used as a template parameter to UnwindCursor when
489489
/// unwinding a thread in the another process. The other process can be a
490490
/// different endianness and a different pointer size which is handled by
491491
/// the P template parameter.
492492
template <typename P>
493-
class OtherAddressSpace {
493+
class RemoteAddressSpace {
494494
public:
495-
OtherAddressSpace(task_t task) : fTask(task) {}
495+
RemoteAddressSpace(task_t task) : fTask(task) {}
496496

497497
typedef typename P::uint_t pint_t;
498498

@@ -515,29 +515,29 @@ class OtherAddressSpace {
515515
task_t fTask;
516516
};
517517

518-
template <typename P> uint8_t OtherAddressSpace<P>::get8(pint_t addr) {
518+
template <typename P> uint8_t RemoteAddressSpace<P>::get8(pint_t addr) {
519519
return *((uint8_t *)localCopy(addr));
520520
}
521521

522-
template <typename P> uint16_t OtherAddressSpace<P>::get16(pint_t addr) {
522+
template <typename P> uint16_t RemoteAddressSpace<P>::get16(pint_t addr) {
523523
return P::E::get16(*(uint16_t *)localCopy(addr));
524524
}
525525

526-
template <typename P> uint32_t OtherAddressSpace<P>::get32(pint_t addr) {
526+
template <typename P> uint32_t RemoteAddressSpace<P>::get32(pint_t addr) {
527527
return P::E::get32(*(uint32_t *)localCopy(addr));
528528
}
529529

530-
template <typename P> uint64_t OtherAddressSpace<P>::get64(pint_t addr) {
530+
template <typename P> uint64_t RemoteAddressSpace<P>::get64(pint_t addr) {
531531
return P::E::get64(*(uint64_t *)localCopy(addr));
532532
}
533533

534534
template <typename P>
535-
typename P::uint_t OtherAddressSpace<P>::getP(pint_t addr) {
535+
typename P::uint_t RemoteAddressSpace<P>::getP(pint_t addr) {
536536
return P::getP(*(uint64_t *)localCopy(addr));
537537
}
538538

539539
template <typename P>
540-
uint64_t OtherAddressSpace<P>::getULEB128(pint_t &addr, pint_t end) {
540+
uint64_t RemoteAddressSpace<P>::getULEB128(pint_t &addr, pint_t end) {
541541
uintptr_t size = (end - addr);
542542
LocalAddressSpace::pint_t laddr = (LocalAddressSpace::pint_t) localCopy(addr);
543543
LocalAddressSpace::pint_t sladdr = laddr;
@@ -547,7 +547,7 @@ uint64_t OtherAddressSpace<P>::getULEB128(pint_t &addr, pint_t end) {
547547
}
548548

549549
template <typename P>
550-
int64_t OtherAddressSpace<P>::getSLEB128(pint_t &addr, pint_t end) {
550+
int64_t RemoteAddressSpace<P>::getSLEB128(pint_t &addr, pint_t end) {
551551
uintptr_t size = (end - addr);
552552
LocalAddressSpace::pint_t laddr = (LocalAddressSpace::pint_t) localCopy(addr);
553553
LocalAddressSpace::pint_t sladdr = laddr;
@@ -556,13 +556,14 @@ int64_t OtherAddressSpace<P>::getSLEB128(pint_t &addr, pint_t end) {
556556
return result;
557557
}
558558

559-
template <typename P> void *OtherAddressSpace<P>::localCopy(pint_t addr) {
559+
template <typename P> void *RemoteAddressSpace<P>::localCopy(pint_t addr) {
560560
// FIX ME
561561
}
562562

563563
template <typename P>
564-
bool OtherAddressSpace<P>::findFunctionName(pint_t addr, char *buf,
565-
size_t bufLen, unw_word_t *offset) {
564+
bool RemoteAddressSpace<P>::findFunctionName(pint_t addr, char *buf,
565+
size_t bufLen,
566+
unw_word_t *offset) {
566567
// FIX ME
567568
}
568569

@@ -578,23 +579,23 @@ struct unw_addr_space {
578579
/// a 32-bit intel process.
579580
struct unw_addr_space_i386 : public unw_addr_space {
580581
unw_addr_space_i386(task_t task) : oas(task) {}
581-
OtherAddressSpace<Pointer32<LittleEndian> > oas;
582+
RemoteAddressSpace<Pointer32<LittleEndian>> oas;
582583
};
583584

584585
/// unw_addr_space_x86_64 is the concrete instance that a unw_addr_space_t
585586
/// points to when examining
586587
/// a 64-bit intel process.
587588
struct unw_addr_space_x86_64 : public unw_addr_space {
588589
unw_addr_space_x86_64(task_t task) : oas(task) {}
589-
OtherAddressSpace<Pointer64<LittleEndian> > oas;
590+
RemoteAddressSpace<Pointer64<LittleEndian>> oas;
590591
};
591592

592593
/// unw_addr_space_ppc is the concrete instance that a unw_addr_space_t points
593594
/// to when examining
594595
/// a 32-bit PowerPC process.
595596
struct unw_addr_space_ppc : public unw_addr_space {
596597
unw_addr_space_ppc(task_t task) : oas(task) {}
597-
OtherAddressSpace<Pointer32<BigEndian> > oas;
598+
RemoteAddressSpace<Pointer32<BigEndian>> oas;
598599
};
599600

600601
#endif // UNW_REMOTE

src/libunwind.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,18 @@ _LIBUNWIND_EXPORT int unw_init_remote_thread(unw_cursor_t *cursor,
8585
switch (as->cpuType) {
8686
case CPU_TYPE_I386:
8787
new ((void *)cursor)
88-
UnwindCursor<OtherAddressSpace<Pointer32<LittleEndian> >,
88+
UnwindCursor<RemoteAddressSpace<Pointer32<LittleEndian>>,
8989
Registers_x86>(((unw_addr_space_i386 *)as)->oas, arg);
9090
break;
9191
case CPU_TYPE_X86_64:
92-
new ((void *)cursor) UnwindCursor<
93-
OtherAddressSpace<Pointer64<LittleEndian> >, Registers_x86_64>(
94-
((unw_addr_space_x86_64 *)as)->oas, arg);
92+
new ((void *)cursor)
93+
UnwindCursor<RemoteAddressSpace<Pointer64<LittleEndian>>,
94+
Registers_x86_64>(((unw_addr_space_x86_64 *)as)->oas, arg);
9595
break;
9696
case CPU_TYPE_POWERPC:
9797
new ((void *)cursor)
98-
UnwindCursor<OtherAddressSpace<Pointer32<BigEndian> >, Registers_ppc>(
99-
((unw_addr_space_ppc *)as)->oas, arg);
98+
UnwindCursor<RemoteAddressSpace<Pointer32<BigEndian>>,
99+
Registers_ppc>(((unw_addr_space_ppc *)as)->oas, arg);
100100
break;
101101
default:
102102
return UNW_EUNSPEC;

0 commit comments

Comments
 (0)