http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54117



--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-08 
11:27:12 UTC ---

The problem is that dbxout.c (unlike dwarf2out.c; not sure about other debug

backends) emits assembly immediately into asm_out_file, pretty much everywhere,

instead of creating data structures from it and emitting everything only during

the finish debughook.  So, if you'd like to avoid reversion of the patch, I'm

afraid you'd pretty much need to implement the same thing, at least for dbxout

(that, in between pch_init (but not earlier, you don't want to duplicate the

stabs created before that) and pch_write the stabs will be say queued into some

GC memory block and that GC memory block will be printed into assembly upon

reading of pch or so.  I doubt fmemopen or similar is portable enough, so you'd

need to rewrite all the dbxout.c code that right now uses fwrite/fputc/putc

etc. to use some other interfaces and conditionally either append to the GC

string, or write into asm_out_file.  Or rewrite dbxout.c to queue up

everything, not sure if it wouldn't break anything if emitted at the end of

assembly though.

Reply via email to