diff options
| author | Greg Clayton <gclayton@apple.com> | 2010-10-04 17:26:49 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2010-10-04 17:26:49 +0000 |
| commit | 0d9c993401bd557b0c5953a4e6fdf4d79f5a52bc (patch) | |
| tree | 5b515a3d74f13d4cd84b9a09465bf89308ba87b1 | |
| parent | 8e4c19ac448e9e7de6bdc9eab20521b48efb26a5 (diff) | |
| download | bcm5719-llvm-0d9c993401bd557b0c5953a4e6fdf4d79f5a52bc.tar.gz bcm5719-llvm-0d9c993401bd557b0c5953a4e6fdf4d79f5a52bc.zip | |
Fixed and issue where we weren't seeing inlined functions anymore. We also now show the correct pc-offset within the inlined function.
llvm-svn: 115522
| -rw-r--r-- | lldb/source/Core/Debugger.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 48e2e6f9400..d2768e72568 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -956,6 +956,20 @@ Debugger::FormatPrompt 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 @@ Debugger::FormatPrompt 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(); } |

