================
@@ -207,6 +207,20 @@ void ABIX86::AugmentRegisterInfo(
 
   uint32_t gpr_base_size =
       process_sp->GetTarget().GetArchitecture().GetAddressByteSize();
+  // Determine the GPR base size. Prefer the target architecture, but fall
+  // back to the register list itself when the target arch isn't set yet
+  if (gpr_base_size == 0) {
+    for (const auto &reg : regs) {
+      if (reg.name == "rax" || reg.name == "rsp" || reg.name == "rip") {
----------------
charles-zablit wrote:

This happens with `process attach -p PID`, if the user does not create a target 
before. This made me reconsider my approach.

https://github.com/llvm/llvm-project/pull/203498
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to