[Lldb-commits] [PATCH] D120319: Set error message if ValueObjectRegister fails to write back to register

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 24 03:27:45 PST 2022


labath added a comment.

So, it seems we were all correct. The mach-o core file implementation does permit writing registers, while the elf one doesn't. I guess we never got that feature request for elf.

I don't think that's a blocker for writing this test though. If we decide to support writing registers in for elf too, we can always change/remove the test.

Another possibility is to use the gdb-client test infrastructure to simulate a server which refuses to write to a register, but those tests are slightly tricky to write, so I don't think that's worth it here (unless you're interested in getting to know that infra, that is).



================
Comment at: lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py:151-152
+        reg_value: lldb.SBValue = frame.FindRegister('eax')
+        if not reg_value.IsValid():
+          return
+
----------------
I don't think there's a valid reason for why should this ever fail.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120319/new/

https://reviews.llvm.org/D120319



More information about the lldb-commits mailing list