diff options
author | Greg Clayton <gclayton@apple.com> | 2015-06-25 21:46:34 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2015-06-25 21:46:34 +0000 |
commit | fd67de3a023958f7af064d27107906db621e5442 (patch) | |
tree | 0161c6deeafcdaff52c60581ba50584ed81a2f48 /lldb/source/Plugins/SystemRuntime | |
parent | 2474bfdebd2a61836dad20bd02f1e18ade01ba0e (diff) |
Resubmitting 240466 after fixing the linux test suite failures.
A few extras were fixed
- Symbol::GetAddress() now returns an Address object, not a reference. There were places where people were accessing the address of a symbol when the symbol's value wasn't an address symbol. On MacOSX, undefined symbols have a value zero and some places where using the symbol's address and getting an absolute address of zero (since an Address object with no section and an m_offset whose value isn't LLDB_INVALID_ADDRESS is considered an absolute address). So fixing this required some changes to make sure people were getting what they expected.
- Since some places want to access the address as a reference, I added a few new functions to symbol:
Address &Symbol::GetAddressRef();
const Address &Symbol::GetAddressRef() const;
Linux test suite passes just fine now.
<rdar://problem/21494354>
Diffstat (limited to 'lldb/source/Plugins/SystemRuntime')
-rw-r--r-- | lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp index 9b18eadbf1d..67f9c59cadf 100644 --- a/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp +++ b/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp @@ -316,7 +316,7 @@ SystemRuntimeMacOSX::ReadLibdispatchOffsetsAddress () dispatch_queue_offsets_symbol = module_sp->FindFirstSymbolWithNameAndType (g_dispatch_queue_offsets_symbol_name, eSymbolTypeData); } if (dispatch_queue_offsets_symbol) - m_dispatch_queue_offsets_addr = dispatch_queue_offsets_symbol->GetAddress().GetLoadAddress(&m_process->GetTarget()); + m_dispatch_queue_offsets_addr = dispatch_queue_offsets_symbol->GetLoadAddress(&m_process->GetTarget()); } void @@ -361,7 +361,7 @@ SystemRuntimeMacOSX::ReadLibpthreadOffsetsAddress () (g_libpthread_layout_offsets_symbol_name, eSymbolTypeData); if (libpthread_layout_offsets_symbol) { - m_libpthread_layout_offsets_addr = libpthread_layout_offsets_symbol->GetAddress().GetLoadAddress(&m_process->GetTarget()); + m_libpthread_layout_offsets_addr = libpthread_layout_offsets_symbol->GetLoadAddress(&m_process->GetTarget()); } } } @@ -410,7 +410,7 @@ SystemRuntimeMacOSX::ReadLibdispatchTSDIndexesAddress () (g_libdispatch_tsd_indexes_symbol_name, eSymbolTypeData); if (libdispatch_tsd_indexes_symbol) { - m_dispatch_tsd_indexes_addr = libdispatch_tsd_indexes_symbol->GetAddress().GetLoadAddress(&m_process->GetTarget()); + m_dispatch_tsd_indexes_addr = libdispatch_tsd_indexes_symbol->GetLoadAddress(&m_process->GetTarget()); } } } |