[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
Mon Feb 7 18:08:53 PST 2022
mib updated this revision to Diff 406666.
mib added a comment.
Use the same approach as rosetta.
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,23 @@
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":
+ registers.update(self.parse_thread_registers({ str(idx) : reg
+ for idx,reg in
+ enumerate(state)},
+ prefix=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.406666.patch
Type: text/x-patch
Size: 1455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220208/2e5cf15a/attachment.bin>
More information about the lldb-commits
mailing list