Closed Bug 380541 Opened 17 years ago Closed 17 years ago

build time logic to extract debug symbols on Linux

Categories

(Toolkit :: Crash Reporting, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ted, Assigned: ted)

References

Details

Attachments

(1 file)

dump_syms on Linux.
Attached patch checkpointSplinter Review
This adds dump_syms as well as the exception handling functionality on Linux.  The crash reporter client isn't really implemented, it's mostly stubbed out, but there's enough there to compile it.  I had to --disable-pedantic to get this to compile, since minidump_format.h doesn't compile with -pedantic.  Mark says they followed the minidump spec closely, which is why they wound up with zero size arrays and such.  I didn't try to implement a crash reporter GUI, I'll leave that for campd.  I also didn't try to implement crash report uploading.  Breakpad has an implementation in src/common/linux/http_upload.cc, but it relies on libcurl, which we don't currently have as a dependency.

I tested this out, but it produced a bad minidump for me.  The minidump was missing the thread list and the memory list.  I'm going to take a look at that.
Comment on attachment 265123 [details] [diff] [review]
checkpoint

As discussed, I'm going to try to get this landed despite the issues so that work can proceed in parallel on the Linux crash reporter client.  I'll continue to work on the bad minidumps and the not compiling under -pedantic problem.
Attachment #265123 - Flags: review?(mark)
Blocks: 380540
Comment on attachment 265123 [details] [diff] [review]
checkpoint

Index: toolkit/airbag/nsAirbagExceptionHandler.cpp

+#elif defined(XP_UNIX)

Can we only apply this to Linux specifically?

+  tempPath = NS_LITERAL_STRING("/tmp/");

umasks and privacy and stuff.  We should really fix (in Breakpad) the fact that MinidumpFileWriter does this:

  file_ = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0666);

Other than that, this looks good so far.
Attachment #265123 - Flags: review?(mark) → review+
(In reply to comment #3)
> (From update of attachment 265123 [details] [diff] [review])
> Index: toolkit/airbag/nsAirbagExceptionHandler.cpp
> 
> +#elif defined(XP_UNIX)
> 
> Can we only apply this to Linux specifically?

Fixed.

> 
> +  tempPath = NS_LITERAL_STRING("/tmp/");
> 
> umasks and privacy and stuff.  We should really fix (in Breakpad) the fact that
> MinidumpFileWriter does this:
> 
>   file_ = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0666);

Filed that on Breakpad: http://code.google.com/p/google-breakpad/issues/detail?id=175

I'll check this in with those changes shortly.
Checked in.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.