This is an archive of the discontinued LLVM Phabricator instance.

[lldb/crashlog] Fix line entries resolution in interactive mode
ClosedPublic

Authored by mib on May 18 2022, 2:10 PM.

Details

Summary

This patch subtracts 1 to the pc of any frame above frame 0 to get the
previous line entry and display the right line in the debugger.

This also rephrase some old comment from 48d157dd4.

rdar://92686666

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>

Diff Detail

Event Timeline

mib created this revision.May 18 2022, 2:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2022, 2:10 PM
mib requested review of this revision.May 18 2022, 2:10 PM
mib edited the summary of this revision. (Show Details)May 18 2022, 2:10 PM
mib edited the summary of this revision. (Show Details)
mib edited the summary of this revision. (Show Details)
mib edited the summary of this revision. (Show Details)
JDevlieghere added inline comments.May 18 2022, 2:14 PM
lldb/examples/python/crashlog.py
118–120

Maybe

Except for the zeroth frame, we should subtract 1 from every frame pc in order to get to the previous line entry

mib updated this revision to Diff 430505.May 18 2022, 2:18 PM
mib marked an inline comment as done.
mib edited the summary of this revision. (Show Details)

Updated comment

This revision is now accepted and ready to land.May 18 2022, 2:22 PM