[all-commits] [llvm/llvm-project] dfdd89: [lldb/crashlog] Load inlined symbol into interacti...
Med Ismail Bennani via All-commits
all-commits at lists.llvm.org
Fri May 19 20:08:40 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dfdd8988621bcdce0364e0c3ab2d6ba52e875f32
https://github.com/llvm/llvm-project/commit/dfdd8988621bcdce0364e0c3ab2d6ba52e875f32
Author: Med Ismail Bennani <ismail at bennani.ma>
Date: 2023-05-19 (Fri, 19 May 2023)
Changed paths:
M lldb/examples/python/crashlog.py
A lldb/test/Shell/ScriptInterpreter/Python/Crashlog/Inputs/interactive_crashlog/multithread-test.crash
A lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_json.test
A lldb/test/Shell/ScriptInterpreter/Python/Crashlog/interactive_crashlog_legacy.test
R lldb/test/Shell/ScriptInterpreter/Python/Crashlog/scripted_crashlog_json.test
Log Message:
-----------
[lldb/crashlog] Load inlined symbol into interactive crashlog
Sometimes, crash reports come with inlined symbols. These provide the
exact stacktrace from the user binary.
However, when investigating a crash, it's very likely that the images related
to the crashed thread are not available on the debugging user system or
that the versions don't match. This causes interactive crashlog to show
a degraded backtrace in lldb.
This patch aims to address that issue, by parsing the inlined symbols
from the crash report and load them into lldb's target.
This patch is a follow-up to 27f27d1, focusing on inlined symbols
loading from legacy (non-json) crash reports.
To do so, it updates the stack frame regular expression to make the
capture groups more granular, to be able to extract the symbol name, the
offset and the source location if available, while making it more
maintainable.
So now, when parsing the crash report, we build a data structure
containing all the symbol information for each stackframe. Then, after
launching the scripted process for interactive mode, we write a JSON
symbol file for each module, only containing the symbols that it contains.
Finally, we load the json symbol file into lldb, before showing the user
the process status and backtrace.
rdar://97345586
Differential Revision: https://reviews.llvm.org/D146765
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
Commit: aefa8f4460d12503d577c085069d632115e22ed4
https://github.com/llvm/llvm-project/commit/aefa8f4460d12503d577c085069d632115e22ed4
Author: Med Ismail Bennani <ismail at bennani.ma>
Date: 2023-05-19 (Fri, 19 May 2023)
Changed paths:
M lldb/examples/python/scripted_process/crashlog_scripted_process.py
Log Message:
-----------
[lldb] Fix process pid parsing issue
This patch should fix an issue when parsing the process pid and setting
it in the scripted process.
It can happen that the `crashlog.process_id` attribute is sometimes
parsed as a string. That would cause the scripted process to pick the
default value (0).
To address that, this patch makes sure that the parsed attributed is
converted to the integer type before passing it to the scripted process.
Differential Revision: https://reviews.llvm.org/D151002
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
Compare: https://github.com/llvm/llvm-project/compare/34d8cd153812...aefa8f4460d1
More information about the All-commits
mailing list