From 27f27d15f6c90b026eca23b8ee238fdbf772fd80 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 13 Apr 2023 16:27:53 -0700 Subject: [lldb] Use ObjectFileJSON to create modules for interactive crashlogs Create an artificial module using a JSON object file when we can't locate the module and dSYM through dsymForUUID (or however locate_module_and_debug_symbols is implemented). By parsing the symbols from the crashlog and making them part of the JSON object file, LLDB can symbolicate frames it otherwise wouldn't be able to, as there is no module for it. For non-interactive crashlogs, that never was a problem because we could simply show the "pre-symbolicated" frame from the input. For interactive crashlogs, we need a way to pass the symbol information to LLDB so that it can symbolicate the frames, which is what motivated the JSON object file format. Differential revision: https://reviews.llvm.org/D148172 --- .../Crashlog/Inputs/interactive_crashlog/multithread-test.ips | 9 +++++++++ .../Python/Crashlog/skipped_status_interactive_crashlog.test | 3 +++ 2 files changed, 12 insertions(+) (limited to 'lldb/test/Shell/ScriptInterpreter/Python') diff --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/interactive_crashlog/multithread-test.ips b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/interactive_crashlog/multithread-test.ips index 33153c8..23ce9d0 100644 --- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/interactive_crashlog/multithread-test.ips +++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/interactive_crashlog/multithread-test.ips @@ -478,6 +478,15 @@ "source" : "A", "base" : 0, "uuid" : "00000000-0000-0000-0000-000000000000" + }, + { + "arch": "arm64", + "base": 12345, + "name": "bogus.dylib", + "path": "/usr/lib/system/bogus.dylib", + "size": 1000, + "source": "P", + "uuid": "11111111-2222-3333-4444-555555555555" } ], "userID": 501, diff --git a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/skipped_status_interactive_crashlog.test b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/skipped_status_interactive_crashlog.test index b120b96..81e0686 100644 --- a/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/skipped_status_interactive_crashlog.test +++ b/lldb/test/Shell/ScriptInterpreter/Python/Crashlog/skipped_status_interactive_crashlog.test @@ -41,3 +41,6 @@ bt all # CHECK-NEXT: frame #2: 0x0000000100ec5a87 multithread-test`compute_pow{{.*}} [artificial] # CHECK: frame #{{[0-9]+}}: 0x000000019cc7e06b{{.*}} [artificial] # CHECK: frame #{{[0-9]+}}: 0x000000019cc78e2b{{.*}} [artificial] + +image list +# CHECK: 11111111-2222-3333-4444-555555555555 {{.*}}bogus.dylib -- cgit v1.1