[Lldb-commits] [PATCH] D119168: [lldb/crashlog] Fix arm64 register parsing on crashlog.py
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 8 11:04:27 PST 2022
mib updated this revision to Diff 406899.
mib added a comment.
Address @shafik comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119168/new/
https://reviews.llvm.org/D119168
Files:
lldb/examples/python/crashlog.py
Index: lldb/examples/python/crashlog.py
===================================================================
--- lldb/examples/python/crashlog.py
+++ lldb/examples/python/crashlog.py
@@ -519,17 +519,21 @@
self.crashlog.threads.append(thread)
idx += 1
- def parse_thread_registers(self, json_thread_state):
+ def parse_thread_registers(self, json_thread_state, prefix=None):
registers = dict()
for key, state in json_thread_state.items():
if key == "rosetta":
- registers.update(self.parse_thread_registers(state))
- continue
+ registers.update(self.parse_thread_registers(state))
+ continue
+ if key == "x":
+ gpr_dict = { str(idx) : reg for idx,reg in enumerate(state) }
+ registers.update(self.parse_thread_registers(gpr_dict, key))
+ continue
try:
- value = int(state['value'])
- registers[key] = value
+ value = int(state['value'])
+ registers["{}{}".format(prefix,key)] = value
except (KeyError, ValueError, TypeError):
- pass
+ pass
return registers
def parse_errors(self, json_data):
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119168.406899.patch
Type: text/x-patch
Size: 1298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220208/63f111c9/attachment.bin>
More information about the lldb-commits
mailing list