mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 17:45:07 +08:00
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>
llvm-svn: 240702
This commit is contained in:
@@ -2246,11 +2246,12 @@ Process::CreateBreakpointSite (const BreakpointLocationSP &owner, bool use_hardw
|
||||
if (symbol && symbol->IsIndirect())
|
||||
{
|
||||
Error error;
|
||||
load_addr = ResolveIndirectFunction (&symbol->GetAddress(), error);
|
||||
Address symbol_address = symbol->GetAddress();
|
||||
load_addr = ResolveIndirectFunction (&symbol_address, error);
|
||||
if (!error.Success() && show_error)
|
||||
{
|
||||
m_target.GetDebugger().GetErrorFile()->Printf ("warning: failed to resolve indirect function at 0x%" PRIx64 " for breakpoint %i.%i: %s\n",
|
||||
symbol->GetAddress().GetLoadAddress(&m_target),
|
||||
symbol->GetLoadAddress(&m_target),
|
||||
owner->GetBreakpoint().GetID(),
|
||||
owner->GetID(),
|
||||
error.AsCString() ? error.AsCString() : "unknown error");
|
||||
|
||||
Reference in New Issue
Block a user