diff options
| author | Greg Clayton <gclayton@apple.com> | 2011-10-01 00:45:15 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2011-10-01 00:45:15 +0000 |
| commit | 1ed54f50c54400c5968396b4aaa0704c0f1e3a72 (patch) | |
| tree | d66070ab60d61fde3db66aedb0eb847c6ff653a7 /lldb/source/Symbol/Block.cpp | |
| parent | 94bcd38d1056f76e21e09e71e004f5d0f77eb063 (diff) | |
| download | bcm5719-llvm-1ed54f50c54400c5968396b4aaa0704c0f1e3a72.tar.gz bcm5719-llvm-1ed54f50c54400c5968396b4aaa0704c0f1e3a72.zip | |
Cleaned up the the code that figures out the inlined stack frames given a
symbol context that represents an inlined function. This function has been
renamed internally to:
bool
SymbolContext::GetParentOfInlinedScope (const Address &curr_frame_pc,
SymbolContext &next_frame_sc,
Address &next_frame_pc) const;
And externally to:
SBSymbolContext
SBSymbolContext::GetParentOfInlinedScope (const SBAddress &curr_frame_pc,
SBAddress &parent_frame_addr) const;
The correct blocks are now correctly calculated.
Switched the stack backtracing engine (in StackFrameList) and the address
context printing over to using the internal SymbolContext::GetParentOfInlinedScope(...)
so all inlined callstacks will match exactly.
llvm-svn: 140910
Diffstat (limited to 'lldb/source/Symbol/Block.cpp')
| -rw-r--r-- | lldb/source/Symbol/Block.cpp | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/lldb/source/Symbol/Block.cpp b/lldb/source/Symbol/Block.cpp index d0f8ff32389..2b00cf8e4b2 100644 --- a/lldb/source/Symbol/Block.cpp +++ b/lldb/source/Symbol/Block.cpp @@ -186,95 +186,6 @@ Block::CalculateSymbolContextBlock () } void -Block::DumpStopContext -( - Stream *s, - const SymbolContext *sc_ptr, - const Declaration *child_inline_call_site, - bool show_fullpaths, - bool show_inline_blocks) -{ - const InlineFunctionInfo* inline_info = NULL; - Block* inlined_block; - if (sc_ptr) - inlined_block = GetContainingInlinedBlock (); - else - inlined_block = GetInlinedParent(); - - if (inlined_block) - inline_info = inlined_block->GetInlinedFunctionInfo(); - const Declaration *inline_call_site = child_inline_call_site; - if (inline_info) - { - inline_call_site = &inline_info->GetCallSite(); - if (sc_ptr) - { - // First frame in a frame with inlined functions - s->PutCString (" [inlined]"); - } - if (show_inline_blocks && child_inline_call_site) - s->EOL(); - else - s->PutChar(' '); - - if (sc_ptr == NULL) - s->Indent(); - - s->PutCString(inline_info->GetName ().AsCString()); - - if (child_inline_call_site && child_inline_call_site->IsValid()) - { - s->PutCString(" at "); - child_inline_call_site->DumpStopContext (s, show_fullpaths); - } - } - - // The first call to this function from something that has a symbol - // context will pass in a valid sc_ptr. Subsequent calls to this function - // from this function for inline purposes will NULL out sc_ptr. So on the - // first time through we dump the line table entry (which is always at the - // deepest inline code block). And subsequent calls to this function we - // will use hte inline call site information to print line numbers. - if (sc_ptr) - { - // If we have any inlined functions, this will be the deepest most - // inlined location - if (sc_ptr->line_entry.IsValid()) - { - s->PutCString(" at "); - sc_ptr->line_entry.DumpStopContext (s, show_fullpaths); - } - } - - if (show_inline_blocks) - { - if (inlined_block) - { - inlined_block->Block::DumpStopContext (s, - NULL, - inline_call_site, - show_fullpaths, - show_inline_blocks); - } - else if (child_inline_call_site) - { - Function *function = CalculateSymbolContextFunction(); - if (function) - { - s->EOL(); - s->Indent (function->GetMangled().GetName().AsCString()); - if (child_inline_call_site && child_inline_call_site->IsValid()) - { - s->PutCString(" at "); - child_inline_call_site->DumpStopContext (s, show_fullpaths); - } - } - } - } -} - - -void Block::DumpSymbolContext(Stream *s) { Function *function = CalculateSymbolContextFunction(); |

