[Lldb-commits] [PATCH] D13646: [LLDB] Don't use signo as key in Signals DenseMap, as signo are not unique
Mohit Bhakkad via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 12 03:25:41 PDT 2015
mohit.bhakkad created this revision.
mohit.bhakkad added a reviewer: clayborg.
mohit.bhakkad added subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits.
mohit.bhakkad set the repository for this revision to rL LLVM.
Herald added a subscriber: emaste.
Looking at the <signo,description> keymap generated by Reset() in LinuxSignals.cpp, we can see that some signo maps to
more than one signals.
So for example, if one tries signal handle command on SIGCLD
(lldb) process handle SIGCLD -s 0 -p 1 -n 0
error: Invalid signal name 'SIGCLD'
As a solution for this,I have tried:
1) std::next() for iterating keymap, but It looks like, entries with duplicate signo are not getting
added in map, so we get one signo only ones.
2) Just like "short_name" field, add another field "alias", and add all signals with same signo
in same entry, but looks like for some of such signals default (suppress, stop, notify) values
are different, for example signo 16 in LinuxSignals.
3) So I suggest to move signo in description part of keymap, and adding serial_no for each signal as unique key.
Let me know if this approach is correct, and I will provide patches for other functions related to signals.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 54939 bytes
Desc: not available
More information about the lldb-commits