This is an archive of the discontinued LLVM Phabricator instance.

[lldb/crashlog] Make register output match lldb ordering in legacy mode
ClosedPublic

Authored by mib on Aug 2 2023, 10:36 AM.

Details

Summary

This patch changes the way we dump the registers from the legacy
crashlog command to make sure that the ordering matches the one from lldb.

rdar://109172073

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>

Diff Detail

Event Timeline

mib created this revision.Aug 2 2023, 10:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 2 2023, 10:36 AM
mib requested review of this revision.Aug 2 2023, 10:36 AM

In general looks good to me. I have one suggestion and one question.

lldb/examples/python/crashlog.py
104

Is there a reason to do anything if self.arch isn't set? (Or is set to None)

126–131

nit: You can avoid an else+continue if you check reg_name at the end. Just a style thing though, feel free to ignore.

mib marked 2 inline comments as done.Aug 2 2023, 10:52 AM
mib added inline comments.
lldb/examples/python/crashlog.py
104

If we fail to parse it from the report or if it's missing (for some reasons), self.crashlog.process_arch will be None.

This revision is now accepted and ready to land.Aug 2 2023, 1:58 PM
bulbazord accepted this revision.Aug 2 2023, 2:01 PM
mib updated this revision to Diff 547010.Aug 3 2023, 2:54 PM
mib marked an inline comment as done.

Address feedback & reformat