[Lldb-commits] [lldb] r115522 - /lldb/trunk/source/Core/Debugger.cpp
Greg Clayton
gclayton at apple.com
Mon Oct 4 10:26:49 PDT 2010
Author: gclayton
Date: Mon Oct 4 12:26:49 2010
New Revision: 115522
URL: http://llvm.org/viewvc/llvm-project?rev=115522&view=rev
Log:
Fixed and issue where we weren't seeing inlined functions anymore. We also now show the correct pc-offset within the inlined function.
Modified:
lldb/trunk/source/Core/Debugger.cpp
Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=115522&r1=115521&r2=115522&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Mon Oct 4 12:26:49 2010
@@ -956,6 +956,20 @@
if (cstr)
{
s.PutCString(cstr);
+
+ if (sc->block)
+ {
+ Block *inline_block = sc->block->GetContainingInlinedBlock ();
+ if (inline_block)
+ {
+ const InlineFunctionInfo *inline_info = sc->block->GetInlinedFunctionInfo();
+ if (inline_info)
+ {
+ s.PutCString(" [inlined] ");
+ inline_info->GetName().Dump(&s);
+ }
+ }
+ }
var_success = true;
}
}
@@ -1083,7 +1097,20 @@
if (sc)
{
if (sc->function)
+ {
func_addr = sc->function->GetAddressRange().GetBaseAddress();
+ if (sc->block)
+ {
+ // Check to make sure we aren't in an inline
+ // function. If we are, use the inline block
+ // range that contains "format_addr" since
+ // blocks can be discontiguous.
+ Block *inline_block = sc->block->GetContainingInlinedBlock ();
+ AddressRange inline_range;
+ if (inline_block && inline_block->GetRangeContainingAddress (format_addr, inline_range))
+ func_addr = inline_range.GetBaseAddress();
+ }
+ }
else if (sc->symbol && sc->symbol->GetAddressRangePtr())
func_addr = sc->symbol->GetAddressRangePtr()->GetBaseAddress();
}
More information about the lldb-commits
mailing list