[Lldb-commits] [PATCH] D70238: [lldb] Allow loading of minidumps with no process id

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 7 10:42:51 PST 2020


jingham added a comment.

In D70238#1808135 <https://reviews.llvm.org/D70238#1808135>, @labath wrote:

> Greg, Jim, any thoughts on pidless processes?


First off, it would be useful to know that the PID for a process couldn't be recovered.  For instance when inspecting a dump file, you might want to correlate the process in the dump with PID's recorded in some system log file. It would be confusing to go to "target list" and just have the Process: 1234 record that's usually there be just absent.  So we need to represent that somehow.  This could either be by cooking the PID, or as Pavel suggested by checking the process status when the PID is invalid and printing "unknown pid" if the PID is invalid but the process status is eStateStopped.

It seems like it would be cleaner to have GetID() express the difference between "process hasn't gotten to the point where I know it's pid yet", and "failure to recover the pid".  But I don't think it's a good idea to randomly pick a PID - again if you are correlating the dump with other records that could send you off on a wild goose chase.  We could make Process::GetID() return an optional, but that seems annoying and would be hard to express across the SB API boundary.  We could either steal another PID for LLDB_UNKNOWN_PROCESS_ID (0xffffffffffffffff?).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70238/new/

https://reviews.llvm.org/D70238





More information about the lldb-commits mailing list