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

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 7 02:21:25 PDT 2024


================
@@ -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. */
+  int32_t addr_lsb;  /* Valid LSB of the reported address.  */
 
   ELFLinuxSigInfo();
 
   lldb_private::Status Parse(const lldb_private::DataExtractor &data,
-                             const lldb_private::ArchSpec &arch);
+                             const lldb_private::ArchSpec &arch,
+                             const lldb::UnixSignalsSP unix_signals_sp);
+
+  std::string GetDescription(const lldb::UnixSignalsSP unix_signals_sp);
----------------
labath wrote:

use `const UnixSignals&`. `const lldb::UnixSignalsSP` is a pointer to a mutable object, and you're not mutating it, nor storing long-term references to it.

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


More information about the lldb-commits mailing list