This is an archive of the discontinued LLVM Phabricator instance.

[lldb/crashlog] Fix scripted_crashlog_json.test failure
ClosedPublic

Authored by mib on Feb 25 2022, 4:07 PM.

Details

Summary

This patch should fix the test failure on scripted_crashlog_json.test.

The failure is caused because crash reporter will obfuscate the
executable path in the crashlog, if it's located inside the user's home
directory and replace it with /USER/*/ as a placeholder.

To fix that, we can patch the placeholder with the executable path
before loading the crashlog in lldb.

This also fixes a bug where we would create another target when loading
the crashlog in a scripted process, even if lldb already had a target
for it. Now, crashlog will only create a target if there is none in lldb.

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

Diff Detail

Event Timeline

mib requested review of this revision.Feb 25 2022, 4:07 PM
mib created this revision.
mib edited the summary of this revision. (Show Details)Feb 25 2022, 4:08 PM
This revision is now accepted and ready to land.Feb 25 2022, 5:20 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2022, 3:42 PM