[Lldb-commits] [PATCH] D146044: [lldb] Implement CrashReason using UnixSignals

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Mar 15 04:04:37 PDT 2023


DavidSpickett marked an inline comment as done.
DavidSpickett added inline comments.


================
Comment at: lldb/source/Plugins/Process/Utility/FreeBSDSignals.cpp:14
 FreeBSDSignals::FreeBSDSignals() : UnixSignals() { Reset(); }
 
 void FreeBSDSignals::Reset() {
----------------
arichardson wrote:
> I wonder if it would make sense to do something like the following to ensure we use the same numbers as defined in FreeBSD (compile-time checks when building on a FreeBSD host). The it would be possible to use 
> `FREEBSD_ILL_ILLOPC` instead of `1 /*ILL_ILLOPC*/` below
This is a cool idea, I'll give this a go (maybe as a follow up change).


================
Comment at: lldb/source/Plugins/Process/Utility/FreeBSDSignals.cpp:57
+  AddSignal(32,   "SIGTHR",      false,   false, false, "thread interrupt");
+  AddSignal(33,   "SIGLIBRT",    false,   false, false, "reserved by real-time library");
+  AddSignal(65,   "SIGRTMIN",    false,   false, false, "real time signal 0");
----------------
arichardson wrote:
> Not sure if it's worth adding here, but CheriBSD (a fork of FreeBSD with support for CHERI) uses 34 for "SIGPROT": https://github.com/CTSRD-CHERI/cheribsd/blob/8993e1c3bba52a2610f863d206b319904c22e121/sys/sys/signal.h#L134
Given that we don't support CheriBSD I'll leave it out for now. I think there is a Cheri llvm branch somewhere though? Worth noting to whomever does the merge there that they need to carry it over if it's in CrashReason there already.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146044



More information about the lldb-commits mailing list