llvm-project/lldb/source/Host/linux
Jordan Rupprecht c5aa63dd56 [lldb/Host] Add missing proc states
The /proc/<pid>/status parsing is missing a few cases:
- Idle
- Parked
- Dead

If we encounter an unknown proc state, this leads to an msan warning. In reality, we only check that the state != Zombie, so it doesn't really matter that we handle all cases, but handle them anyway (current list: [1]). Also explicitly set it to unknown if we encounter an unknown state. There will still be an msan warning if the proc entry has no `State:` line, but that should not happen.

Use a StringSwitch to make the handling of proc states a little more compact.

[1] https://github.com/torvalds/linux/blob/master/fs/proc/array.c

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D86818
2020-09-02 08:24:06 -07:00
..
AbstractSocket.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Host.cpp [lldb/Host] Add missing proc states 2020-09-02 08:24:06 -07:00
HostInfoLinux.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
LibcGlue.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Support.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00