llvm-project/lldb/test/Shell/Minidump
Pavel Labath 468ca490c6 [lldb] Allow loading of minidumps with no process id
Summary:
Normally, on linux we retrieve the process ID from the LinuxProcStatus
stream (which is just the contents of /proc/%d/status pseudo-file).

However, this stream is not strictly required (it's a breakpad
extension), and we are encountering a fair amount of minidumps which do
not have it present. It's not clear whether this is the case with all
these minidumps, but the two known situations where this stream can be
missing are:
- /proc filesystem not mounted (or something to that effect)
- process crashing after exhausting (almost) all file descriptors (so
  the minidump writer may not be able to open the /proc file)

Since this is a corner case which will become less and less relevant
(crashpad-generated minidumps should not suffer from this problem), I
work around this problem by hardcoding the PID to 1 in these cases.
The same thing is done by the gdb plugin when talking to a stub which
does not report a process id (e.g. a hardware probe).

Reviewers: jingham, clayborg

Subscribers: markmentovai, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D70238
2020-01-20 13:08:58 +01:00
..
Inputs minidump: Create memory regions from the sections of loaded modules 2019-10-31 11:24:55 +01:00
Windows [LLDB] [ARM] Use r11 as frame pointer on Windows on ARM 2019-11-29 16:06:17 +02:00
breakpad-symbols.test Re-land "[test] Split LLDB tests into API, Shell & Unit" 2019-10-09 19:22:02 +00:00
disassemble-no-module.yaml Re-land "[test] Split LLDB tests into API, Shell & Unit" 2019-10-09 19:22:02 +00:00
dump-all.test minidump: Rename some architecture constants 2019-10-30 14:46:00 +01:00
fb-dump.test minidump: Rename some architecture constants 2019-10-30 14:46:00 +01:00
lit.local.cfg Re-land "[test] Split LLDB tests into API, Shell & Unit" 2019-10-09 19:22:02 +00:00
memory-region-from-module.yaml MemoryRegion: Print "don't know" permission values as such 2019-11-05 11:17:27 +01:00
memory-region.yaml lldb/minidump: Refactor memory region computation code 2019-10-25 22:33:32 +00:00
no-process-id.yaml [lldb] Allow loading of minidumps with no process id 2020-01-20 13:08:58 +01:00