[Lldb-commits] [PATCH] D13646: [LLDB] Don't use signo as key in Signals DenseMap, as signo are not unique

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 15 09:44:25 PDT 2015


clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

See inlined comments.


================
Comment at: include/lldb/Target/UnixSignals.h:101-102
@@ -100,1 +100,4 @@
 
+    ConstString
+    GetShortName(ConstString name) const;
+
----------------
Why are we doing this by name? shouldn't we do this with the signal number? And shouldn't this be named GetSignalAlias()?

================
Comment at: source/Target/UnixSignals.cpp:177
@@ +176,3 @@
+ConstString
+UnixSignals::GetShortName(ConstString name) const
+{
----------------
Should the name be GetAlias? Should the argument be a signal number?

================
Comment at: source/Target/UnixSignals.cpp:196
@@ -186,1 +195,3 @@
+        if ((const_name == pos->second.m_name) || (const_name == pos->second.m_alias) ||
+            (const_name == GetShortName(pos->second.m_name)) || (const_name == GetShortName(pos->second.m_alias)))
             return pos->first;
----------------
Call GetAlias and use signal number here?


Repository:
  rL LLVM

http://reviews.llvm.org/D13646





More information about the lldb-commits mailing list