[Lldb-commits] [PATCH] D77793: Fix LLDB elf core dump register access for ARM/AArch64

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 14 07:27:36 PDT 2020

labath added a comment.

Thanks for doing this. The patch is pretty straight-forward. I'd just like to get some clarification about the defensive read register checks.

Comment at: lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.cpp:46
                                                 RegisterValue &value) {
+  if (!reg_info)
+    return false;
Other elf core register contexts don't have this check. Why is it necessary here? Is that the `register read --all` bug ? If it is then isn't the proper solution to ensure we don't call this with a null register info ?

Comment at: lldb/test/API/functionalities/postmortem/elf-core/aarch64-neon.c:14-56
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 8
+void matrix_multiply(float *matrix_a, float *matrix_b, float *matrix_r,
+                     unsigned int rows, unsigned int cols) {
+  if (rows != cols)
+    return;
I think it would be simpler, more obvious, and generate a smaller core file if you just used the inline assembly necessary to populate the relevant registers with necessary values (similar to the `test/Shell/Register/*` tests).



More information about the lldb-commits mailing list