Crash reporting in clang/lldb

Hi all,

I would like to integrate crash reporting into Android developer tools, starting with lldb and clang. Google Breakpad seems like a reasonable option.

https://code.google.com/p/google-breakpad/

Of course, it will only be enabled when the user has allowed it.

The LLDB project is interested but it makes sense to us to push crash reporting down into llvm to make it available to all llvm projects.

There are a couple of options here:

  1. integrate this only downstream in our repo
  2. integrate in lldb ToT, defaulted to off by #defines
  3. integrate in lldb ToT without #define requirements

I would prefer #3

Thoughts?

+llvmdev
-llvm-dev

+llvmdev
-llvm-dev

Hi all,

I would like to integrate crash reporting into Android developer tools, starting with lldb and clang. Google Breakpad seems like a reasonable option.

Monorail - google-breakpad - Crash reporting - Monorail

Of course, it will only be enabled when the user has allowed it.

The LLDB project is interested but it makes sense to us to push crash reporting down into llvm to make it available to all llvm projects.

There are a couple of options here:

1) integrate this only downstream in our repo
2) integrate in lldb ToT, defaulted to off by #defines
3) integrate in lldb ToT without #define requirements

I would prefer #3

Thoughts?

I would prefer #3. You already have to assemble a bunch of pieces to start doing lldb development, I'd rather not add another.

Also, I'd prefer to have this OFF for debug builds: getting reports of development lldb's crashing is not helpful for anything other than telling whether I (or you, or Greg...) are having a good day...

If the "allow crash reporting" is a system or user-wide setting, then the best way to do this and NOT force all lldb developers to turn off crash-reporting for the lldb installed on their system is to have some defines that are not set in the debug build.

Jim

For what it's worth, I gave breakpad a quick build test on FreeBSD,
and it builds just fine. I can't get the full test suite to work
out-of-the-box because it looks like breakpad includes a copy of gtest
that's several years old and disagrees with some C++11 (tr1::tuple
issues). Up-to-date gtest itself builds and passes tests on FreeBSD,
however.

So it looks like breakpad needs some basic updating to be usable
across the board in LLVM or LLDB.

What about a debugger setting like debugger.enable-crash-reporting which defaults to False in debug builds and true in release builds. Or just always defaults to False unless you build with a specific preprocessor define, but you can still turn it on in the application by changing the setting.

Plus this gives users a convenient means to opt out of it, which is usually desirable when it comes to things that collect data.

We should definitely have a setting. But I also want define machinery because Apple has its own system wide crashreporting mechanism and that is the one we want to use for the lldb that Apple distributes. And I don't want to have to support building breakpad in Apple's build system which I don't actually intend to use. So if there's no define to make all this code unnecessary, I'm going to have to add it on my end anyway.

But I also think that it seems silly to add to the number of packages people have to download just to play around with lldb. And for just playing around with the lldb sources, this crash reporting is wholly unnecessary functionality.

Jim