[all-commits] [llvm/llvm-project] 468ca4: [lldb] Allow loading of minidumps with no process id
Pavel Labath via All-commits
all-commits at lists.llvm.org
Mon Jan 20 04:13:24 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 468ca490c6030462066f8e731902d81bab11c356
https://github.com/llvm/llvm-project/commit/468ca490c6030462066f8e731902d81bab11c356
Author: Pavel Labath <pavel at labath.sk>
Date: 2020-01-20 (Mon, 20 Jan 2020)
Changed paths:
M lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
A lldb/test/Shell/Minidump/no-process-id.yaml
Log Message:
-----------
[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
More information about the All-commits
mailing list