aboutsummaryrefslogtreecommitdiff
path: root/source/Breakpoint/BreakpointLocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Breakpoint/BreakpointLocation.cpp')
-rw-r--r--source/Breakpoint/BreakpointLocation.cpp43
1 files changed, 40 insertions, 3 deletions
diff --git a/source/Breakpoint/BreakpointLocation.cpp b/source/Breakpoint/BreakpointLocation.cpp
index 5009e862d84b..2c75a11e9788 100644
--- a/source/Breakpoint/BreakpointLocation.cpp
+++ b/source/Breakpoint/BreakpointLocation.cpp
@@ -39,16 +39,29 @@ BreakpointLocation::BreakpointLocation
Breakpoint &owner,
const Address &addr,
lldb::tid_t tid,
- bool hardware
+ bool hardware,
+ bool check_for_resolver
) :
StoppointLocation (loc_id, addr.GetOpcodeLoadAddress(&owner.GetTarget()), hardware),
m_being_created(true),
+ m_should_resolve_indirect_functions (false),
+ m_is_reexported (false),
+ m_is_indirect (false),
m_address (addr),
m_owner (owner),
m_options_ap (),
m_bp_site_sp (),
m_condition_mutex ()
{
+ if (check_for_resolver)
+ {
+ Symbol *symbol = m_address.CalculateSymbolContextSymbol();
+ if (symbol && symbol->IsIndirect())
+ {
+ SetShouldResolveIndirectFunctions (true);
+ }
+ }
+
SetThreadID (tid);
m_being_created = false;
}
@@ -545,7 +558,10 @@ BreakpointLocation::GetDescription (Stream *s, lldb::DescriptionLevel level)
if (level == lldb::eDescriptionLevelFull || level == eDescriptionLevelInitial)
{
- s->PutCString("where = ");
+ if (IsReExported())
+ s->PutCString ("re-exported target = ");
+ else
+ s->PutCString("where = ");
sc.DumpStopContext (s, m_owner.GetTarget().GetProcessSP().get(), m_address, false, true, false);
}
else
@@ -584,7 +600,10 @@ BreakpointLocation::GetDescription (Stream *s, lldb::DescriptionLevel level)
if (sc.symbol)
{
s->EOL();
- s->Indent("symbol = ");
+ if (IsReExported())
+ s->Indent ("re-exported target = ");
+ else
+ s->Indent("symbol = ");
s->PutCString(sc.symbol->GetMangled().GetName().AsCString("<unknown>"));
}
}
@@ -612,6 +631,24 @@ BreakpointLocation::GetDescription (Stream *s, lldb::DescriptionLevel level)
m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress, Address::DumpStyleFileAddress);
else
m_address.Dump(s, exe_scope, Address::DumpStyleLoadAddress, Address::DumpStyleModuleWithFileAddress);
+
+ if (IsIndirect() && m_bp_site_sp)
+ {
+ Address resolved_address;
+ resolved_address.SetLoadAddress(m_bp_site_sp->GetLoadAddress(), target);
+ Symbol *resolved_symbol = resolved_address.CalculateSymbolContextSymbol();
+ if (resolved_symbol)
+ {
+ if (level == eDescriptionLevelFull || level == eDescriptionLevelInitial)
+ s->Printf (", ");
+ else if (level == lldb::eDescriptionLevelVerbose)
+ {
+ s->EOL();
+ s->Indent();
+ }
+ s->Printf ("indirect target = %s", resolved_symbol->GetName().GetCString());
+ }
+ }
if (level == lldb::eDescriptionLevelVerbose)
{