Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I'm wondering whether it's possible to consolidate linux signal logic in a single place - now we have 3 sites where we instantiate LinuxSignals and need to check for mips as well:
- source/Host/linux/Host.cpp
- https://github.com/llvm-mirror/lldb/blob/7ca60062e09b2ddbc68845b4b6c000fedf308351/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp#L834 - btw, it checks only for mips64 or mips64el
- https://github.com/llvm-mirror/lldb/blob/f7adf4b988da7bd5e13c99af60b6f030eb1beefe/source/Plugins/Process/elf-core/ProcessElfCore.cpp#L248 - we might want to put mips signals here as well.
As an idea - we can have factory method LinuxSignals::Create(const ArchSpec&) which will encompass decision making about creating LinuxSignals or MipsLinuxSignals. So, then LinuxSignals::Create can be reused on all call sites (to be safe - with protected LinuxSignals constructor to prevent explicit creation).
source/Host/linux/Host.cpp | ||
---|---|---|
396 ↗ | (On Diff #26959) | Please add spaces around = |
399 ↗ | (On Diff #26959) | ditto. |
My vote would be to build a Host::GetSignals(), have lldb-server use it, add the signal information to the qHostInfo packet. Then all signal info becomes the responsibility of the lldb-server we connect to which can use the current lldb_private::Host layer to determine the info correctly. The implementation becomes a #define fest for all the different hosts, but at least it is clean.
Greg
I agree with Greg. Situation is even more complicated when you take the realtime signals into account. Currently, the numbers for these differ between linux and android *and* they also differ between x86, arm, arm64 (haven't checked mips). Getting these right on the client will be very tricky.