[Lldb-commits] [lldb] [LLDB][ProcessELFCore] Add Description to ProcessELFCore/ELFThread stop reasons (PR #110065)

Jacob Lalonde via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 7 11:57:32 PDT 2024


================
@@ -76,14 +76,33 @@ 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;
+  // Copied from siginfo_t so we don't have to include signal.h on non 'Nix
+  // builds, we add `g` to the si_ prefix because siginfo_t defines them as
+  // macros.
+  struct {
+    lldb::addr_t sig_addr;  /* faulting insn/memory ref. */
+    short int sig_addr_lsb; /* Valid LSB of the reported address.  */
+    union {
+      /* used when si_code=SEGV_BNDERR */
+      struct {
+        lldb::addr_t _lower;
+        lldb::addr_t _upper;
+      } _addr_bnd;
+      /* used when si_code=SEGV_PKUERR */
+      uint32_t _pkey;
+    } _bounds;
+  } _sigfault;
----------------
Jlalond wrote:

Doesn't the name at the end of the struct denote it's also a member? I moved these to the top and then I then had to separately declare a member of my new struct type.

https://github.com/llvm/llvm-project/pull/110065


More information about the lldb-commits mailing list