Cloosen-Calories / google-breakpad

Automatically exported from code.google.com/p/google-breakpad
0 stars 0 forks source link

Stabs reader incorrectly assumes a single compilation unit #359

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The stabs reading code in google-breakpad incorrectly assumes that the
stabs data is a single compilation unit.  This is true when linking with
the GNU linker by default, because the GNU linker optimizes stabs debug
info.  The gold linker does not do this optimization.  It can be disabled
when using the GNU linker with the --traditional-format command line option.

For more details of the problem including a patch to google-breakpad,
please see a bug report filed against the gold linker:

http://sourceware.org/bugzilla/show_bug.cgi?id=10338

Original issue reported on code.google.com by ianlance...@gmail.com on 4 Jan 2010 at 11:15

GoogleCodeExporter commented 9 years ago
Jim, mind taking a glance at this one?

Thanks,

Neal

Original comment by neal...@gmail.com on 8 Jan 2010 at 10:56

GoogleCodeExporter commented 9 years ago
Thanks for working this out, Ian.  This seems to have been present since before 
I
worked on the STABS code.

Your analysis looks right to me, but I wonder if there isn't a nicer way to do 
the
patch.  In particular, don't N_UNDF stabs appear before the initial N_SO(s) for 
a
compilation unit?  If that's true, then we could recognize the N_UNDF entries in
StabsReader::Process, which would be a bit cleaner.  I'll redo the patch; just 
let me
know if this is true.

I'll see if I can reproduce this; if not, I may need to ask Lei for an object 
file I
can use for testing.

Original comment by jimbla...@gmail.com on 9 Jan 2010 at 12:16

GoogleCodeExporter commented 9 years ago
Hi Jim.  You should be able to reproduce the problem with GNU ld by using the --
traditional-format linker option.  Yes, there should normally be an N_UNDF stab 
at the 
start of the stabs for each compilation unit.

Original comment by ianlance...@gmail.com on 9 Jan 2010 at 1:11

GoogleCodeExporter commented 9 years ago
I've filed a fix for this:
http://breakpad.appspot.com/54003

Original comment by jimbla...@gmail.com on 13 Jan 2010 at 7:26

GoogleCodeExporter commented 9 years ago
Fix reviewed, committed, r490.

Original comment by jimbla...@gmail.com on 14 Jan 2010 at 5:27