[lldb-dev] How can I detect that LLDB is running from within the test suite?

Zachary Turner zturner at google.com
Wed Dec 10 17:19:05 PST 2014


Also yes this is for the case when lldb, used as a python module, crashes.
But we only want to disable it in the extension module case. The default
behavior when you run lldb from the command line should be to pop up the
dialog, since that is the normal behavior when windows apps crash
On Wed, Dec 10, 2014 at 5:09 PM Zachary Turner <zturner at google.com> wrote:

> Its a windows thing, built into the os. Nothing we're doing, although we
> can opt out of it by making a few system calls at startup.
>
> In general its very useful because it allows to attach to a process that
> crashed without having to use a dump, and have full access to the process's
> address space, but obviously we want to turn this off when lldb is being
> automated, as in the case of the test suite.
> On Wed, Dec 10, 2014 at 4:58 PM Greg Clayton <gclayton at apple.com> wrote:
>
>>
>> > On Dec 10, 2014, at 3:45 PM, Zachary Turner <zturner at google.com> wrote:
>> >
>> > When the test suite runs, there's a few things I need to do differently
>> than when the test suite doesn't run.
>> >
>> > 1) I need to configure Windows so that instead of popping up an error
>> dialog and waiting for user interaction whenever we crash, it just silently
>> crashes and generates a dump.
>>
>> You aren't manually popping up an alert from a command line tool are you?
>> Is this something built into windows? Or is this LLDB that is crashing? If
>> it is LLDB or python that is crashing, then I can see adding something to
>> detect this.
>>
>> > 2) I need to force inferiors to launch without a console window.
>> >
>> > Both of these things are very Windows-specific, so if I were to add a
>> method to the public API, the method wouldn't make sense for other
>> platforms.
>> >
>> > Also, #2 is probably something that we always want when running from
>> the test suite, but #1 is something that I can imagine wanting to be
>> configurable.  For example, when running the test suite on a build bot,
>> obviously we must not have any popups that require user interaction.  But
>> when running the test suite locally, we would want the popup so that we can
>> easily attach a debugger and figure out why the test is crashing.
>>
>> I would never pop anything up in a dialog box if possible. If you are
>> debugging a process and it crashes, the debugger should show you the crash.
>>
>> > Any thoughts as to the best way to achieve this?  One idea I had was to
>> have the test suite set an environment variable, and have LLDB look for
>> this environment variable.  That seems like a bit of a hack, so I'm open to
>> other suggestions.
>>
>> If this is detecting when LLDB or python crashes, then I would suppress
>> this using an environment variable that is set by something in lldbtest.py
>> for windows only.
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20141211/db511a8a/attachment.html>


More information about the lldb-dev mailing list