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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 14 10:27:53 PDT 2023


labath added a comment.

It's not exactly what I had in mind, but I kinda like it :)



================
Comment at: lldb/include/lldb/Target/UnixSignals.h:127
+  struct SignalCode {
+    ConstString m_description;
+    SignalCodePrintOption m_print_option;
----------------
I think we should just make strings out of these, particularly since we now also have a map here. It's not like this is extremely performance-sensitive code.


================
Comment at: lldb/source/Plugins/Process/POSIX/CrashReason.cpp:25
+  std::string description =
+      lldb_private::UnixSignals::CreateForHost()->GetSignalAsString(
+          info.si_signo, info.si_code,
----------------
I think this function should really be called GetSignalDescription, or something similar


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