From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Robert Lipe Cc: Jason Merrill , wilson@cygnus.com, egcs@cygnus.com Subject: Re: dwarf2 debug dependent upon GAS? Date: Sun, 28 Feb 1999 22:53:00 -0000 Message-ID: <29507.920192219@hurl.cygnus.com> References: <19990226012522.D17655@rjlhome.sco.com> X-SW-Source: 1999-02n/msg01415.html Message-ID: <19990228225300.0hnN9b-JDRB_8hS5LBqG7F058FS1Gd4lFxMnSCDfJ98@z> In message < 19990226012522.D17655@rjlhome.sco.com >you write: > > Actually, I think we should use ASM_{GENERATE,OUTPUT}_INTERNAL_LABEL to > > handle such matters, like we do for text_end_label (and as the comment in > > dwarfout.c suggests). That's a bit more complicated than this approach, > > but more correct. > > > This isn't quite right, but I'm calling it a night. > > >From the hip, my guess is that add_AT_section_offset() is calling > stripattributes() on that third argument which is no longer appropriate. > > The bogus code looks like: > > .ascii "/tmp/x.c\0" / DW_AT_name > .ascii "/home3/negcs/gcc\0" / DW_AT_comp_dir > .ascii "GNU C egcs-2.93.09 19990225 (gcc2 ss-980929 experimental)\0 > " > / DW_AT_producer > .byte 0x1 / DW_AT_language > .4byte .Ltext_label0 / DW_AT_low_pc > .4byte .Letext0 / DW_AT_high_pc > -> .4byte *.Ldebug_line_label0 / DW_AT_stmt_list > .byte 0x2 / ULEB128 0x2 (DIE (0x6d) DW_TAG_subprogram) > .byte 0x1 / DW_AT_external > > Remove the '*' from that line, and it compiles and links again. This looks a lot like something I had to fight not long ago. Basically all this code is bypassing the logic to strip out unwanted stuff from the symbol. In my case it was easier to just put the label into an operand and use the % syntax of output_asm_insn to do what I needed to do. I don't know if that kind of solution will work for what you are doing though. [ See ashrdi3_non_const_int in the x86 port ]. jeff