[Lldb-commits] [PATCH] D118484: [lldb/test] Fix TestScriptedProcess.py timeout on x86_64
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 28 10:32:44 PST 2022
JDevlieghere added inline comments.
================
Comment at: lldb/examples/python/scripted_process/scripted_process.py:323-344
+ {'name': 'rax', 'bitsize': 64, 'offset': 0, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 0, 'dwarf': 0},
+ {'name': 'rbx', 'bitsize': 64, 'offset': 8, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 3, 'dwarf': 3},
+ {'name': 'rcx', 'bitsize': 64, 'offset': 16, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 2, 'dwarf': 2, 'generic': 'arg4', 'alt-name': 'arg4'},
+ {'name': 'rdx', 'bitsize': 64, 'offset': 24, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 1, 'dwarf': 1, 'generic': 'arg3', 'alt-name': 'arg3'},
+ {'name': 'rdi', 'bitsize': 64, 'offset': 32, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 5, 'dwarf': 5, 'generic': 'arg1', 'alt-name': 'arg1'},
+ {'name': 'rsi', 'bitsize': 64, 'offset': 40, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 4, 'dwarf': 4, 'generic': 'arg2', 'alt-name': 'arg2'},
+ {'name': 'rbp', 'bitsize': 64, 'offset': 48, 'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 6, 'dwarf': 6, 'generic': 'fp', 'alt-name': 'fp'},
----------------
Since you're already modifying these lines, maybe it's worth moving this into a constant. That'll make the class itself a lot more readable.
================
Comment at: lldb/test/API/functionalities/scripted_process/invalid_scripted_process.py:57
return { "type": lldb.eStopReasonSignal, "data": {
- "signal": signal.SIGINT
+ "signal": signal.SIGTRAP
} }
----------------
What's the motivation from switching from SIGINT to SIGTRAP?
================
Comment at: lldb/test/API/functionalities/scripted_process/stack_core_scripted_process.py:128-137
+ selected_thread_idx = self.scripted_process.get_selected_thread_index()
+ if selected_thread_idx == self.corefile_thread.GetIndexID():
+ if 'arm64' in self.scripted_process.arch:
+ stop_reason["type"] = lldb.eStopReasonException
stop_reason["data"]["desc"] = self.corefile_thread.GetStopDescription(100)
+ elif self.scripted_process.arch == 'x86_64':
+ stop_reason["type"] = lldb.eStopReasonSignal
----------------
Can you remind me why we can't read this information from the thread in the core file?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118484/new/
https://reviews.llvm.org/D118484
More information about the lldb-commits
mailing list