This is an archive of the discontinued LLVM Phabricator instance.

Fix "image lookup --address" Summary results for inline functions.
ClosedPublic

Authored by clayborg on Mar 16 2021, 10:14 PM.

Details

Summary

Inline callstacks were being incorrectly displayed in the results of "image lookup --address". The deepest frame wasn't displaying the line table line entry, it was always showing the inline information's call file and line on the previous frame. This is now fixed and has tests to make sure it doesn't regress.

Diff Detail

Event Timeline

clayborg requested review of this revision.Mar 16 2021, 10:14 PM
clayborg created this revision.
Herald added a project: Restricted Project. · View Herald Transcript
clayborg updated this revision to Diff 331404.Mar 17 2021, 4:02 PM

Remove extra parameter call to SymbolContext::DumpStopContext() recrusive call that was left over from iterating on my patch.

clayborg added a comment.EditedMar 17 2021, 4:06 PM

If anyone wants to try this out, you can yaml2obj the yaml file and then do manual lookups. You can also debug any binary with inline function calls and stop anywhere and compare "bt" to the "image lookup --address $pc" to verify this works as expected.

I'm not that familiar with this function, but the output seems right. Given that the show_inline_callsite_line_info argument is no longer used, can you remove it?

lldb/source/Symbol/SymbolContext.cpp
132

I'm not sure if describing the old behavior of deleted code is that helpful. This may be better off in the commit message.

lldb/test/Shell/Commands/command-image-lookup.yaml
130

Could we delete pub*, aranges, and apple_* sections?

clayborg updated this revision to Diff 334274.Mar 30 2021, 2:43 PM

Remove show_inline_callsite_line_info setting from SymbolContext dumping function as it isn't needed, show_inlined_frames controls this.

labath accepted this revision.Apr 1 2021, 1:46 AM
This revision is now accepted and ready to land.Apr 1 2021, 1:46 AM

Anyone else have any issue with this patch?

Anyone else have any issue with this patch?

sorry, I didn't see the accepted part!

This revision was landed with ongoing or failed builds.Apr 1 2021, 11:36 AM
This revision was automatically updated to reflect the committed changes.