summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-07-23 19:35:02 +0000
committeremaste <emaste@FreeBSD.org>2014-07-23 19:35:02 +0000
commitaa794b38fedea0f2e99519975acab0b289714b41 (patch)
treed542e0aa192601387eab969343acfada413521e6 /contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp
parent35d9abcb8d9ec0494bd89b56ca40aa22b6206e54 (diff)
downloadFreeBSD-src-aa794b38fedea0f2e99519975acab0b289714b41.zip
FreeBSD-src-aa794b38fedea0f2e99519975acab0b289714b41.tar.gz
MFC r262528: Update LLDB snapshot to upstream r202189
Highlights include (upstream revs in parens): - Improvements to the remote GDB protocol client (r196610, r197579, r197857, r200072, and others) - Bug fixes for big-endian targets (r196808) - Initial support for libdispatch (GCD) queues in the debuggee (r197190) - Add "step-avoid-libraries" setting (r199943) - IO subsystem improvements (including initial work on a curses gui) (r200263) - Support hardware watchpoints on FreeBSD (r201706) - Improved unwinding through hand-written assembly functions (r201839) - Handle DW_TAG_unspecified_parameters for variadic functions (r202061) - Fix Ctrl+C interrupting a running inferior process (r202086, r202154) - Various bug fixes for memory leaks, LLDB segfaults, the C++ demangler, ELF core files, DWARF debug info, and others. Sponsored by: DARPA, AFRL
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp43
1 files changed, 40 insertions, 3 deletions
diff --git a/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp b/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp
index 5009e86..2c75a11 100644
--- a/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp
+++ b/contrib/llvm/tools/lldb/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)
{
OpenPOWER on IntegriCloud