================
@@ -76,14 +76,19 @@ static_assert(sizeof(ELFLinuxPrStatus) == 112,
               "sizeof ELFLinuxPrStatus is not correct!");
 
 struct ELFLinuxSigInfo {
-  int32_t si_signo;
-  int32_t si_code;
+  int32_t si_signo; // Order matters for the first 3.
   int32_t si_errno;
+  int32_t si_code;
+  lldb::addr_t addr; /* faulting insn/memory ref. */
----------------
clayborg wrote:

name `si_addr` just like in the `siginfo_t` structure since the other names are 
using this convention. You might want to mirror more what the definition is by 
adding a anonymous union and then add the `_sigfault` entry to match the real 
definition. 


I compiled in linux and this is what it looks like:
```
(siginfo_t) siginfo = {
  (int) si_signo = 0
  (int) si_errno = 0
  (int) si_code = 0
  (int) __pad0 = 0
  (siginfo_t::(unnamed union)) _sifields = {
    (int[28]) _pad = {
      (int) [0] = 0
      (int) [1] = 0
      (int) [2] = 0
      (int) [3] = 0
      (int) [4] = 0
      (int) [5] = 0
      (int) [6] = 0
      (int) [7] = 0
      (int) [8] = 0
      (int) [9] = 0
      (int) [10] = 0
      (int) [11] = 0
      (int) [12] = 0
      (int) [13] = 0
      (int) [14] = 0
      (int) [15] = 0
      (int) [16] = 0
      (int) [17] = 0
      (int) [18] = 0
      (int) [19] = 0
      (int) [20] = 0
      (int) [21] = 0
      (int) [22] = 0
      (int) [23] = 0
      (int) [24] = 0
      (int) [25] = 0
      (int) [26] = 0
      (int) [27] = 0
    }
    (siginfo_t::(unnamed struct)) _kill = {
      (__pid_t) si_pid = 0
      (__uid_t) si_uid = 0
    }
    (siginfo_t::(unnamed struct)) _timer = {
      (int) si_tid = 0
      (int) si_overrun = 0
      (__sigval_t) si_sigval = {
        (int) sival_int = 0
        (void *) sival_ptr = 0x0000000000000000
      }
    }
    (siginfo_t::(unnamed struct)) _rt = {
      (__pid_t) si_pid = 0
      (__uid_t) si_uid = 0
      (__sigval_t) si_sigval = {
        (int) sival_int = 0
        (void *) sival_ptr = 0x0000000000000000
      }
    }
    (siginfo_t::(unnamed struct)) _sigchld = {
      (__pid_t) si_pid = 0
      (__uid_t) si_uid = 0
      (int) si_status = 0
      (__clock_t) si_utime = 0
      (__clock_t) si_stime = 0
    }
    (siginfo_t::(unnamed struct)) _sigfault = {
      (void *) si_addr = 0x0000000000000000
      (short) si_addr_lsb = 0
      (siginfo_t::(unnamed union)) _bounds = {
        (siginfo_t::(unnamed struct)) _addr_bnd = {
          (void *) _lower = 0x0000000000000000
          (void *) _upper = 0x0000000000000000
        }
        (__uint32_t) _pkey = 0
      }
    }
    (siginfo_t::(unnamed struct)) _sigpoll = {
      (long) si_band = 0
      (int) si_fd = 0
    }
    (siginfo_t::(unnamed struct)) _sigsys = {
      (void *) _call_addr = 0x0000000000000000
      (int) _syscall = 0
      (unsigned int) _arch = 0
    }
  }
}
```


https://github.com/llvm/llvm-project/pull/110065
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to