[lldb-dev] lldb: how can I make it reliably scriptable?

Paul Smith paul at mad-scientist.net
Tue Feb 24 07:09:12 PST 2015


On Tue, 2015-02-24 at 16:54 +0300, Azat Khuzhin wrote:
> You could also get the pid of just-lauched process and look into
> /cores/core.$! (AFAIR /cores/core.%PID% is the default on osx).

It is.  The problem is that our product involves a number of processes
being run at the same time (client/server and server/server) so there's
not just one PID.  Also, we have a management tool (written in Java)
which controls these processes: our tests use that tool and don't start
all programs directly, so it's difficult to get a list of all the PIDs
that we started during the test and what binary each one matched up
with.  And we have a bunch of unit test programs (created with gtest)
which are invoked via CMake's ctest program, which also doesn't report
PID information.

In the end it's much simpler to just ask the core file, and treat them
all the same.

I tried looked at OSX's DiagnosticReports/*.crash files that are
automatically created when a core happens, which is a really handy
feature, but unfortunately contain only a partial path to the binary:

   Path:            /Users/*/someprog

:-(




More information about the lldb-dev mailing list