This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix c++/debug test suite suite breakage on darwin


On Tue, Sep 08, 2009 at 11:51:05AM -0400, Jason Merrill wrote:
> Why does -fno-merge-debug-strings affect -dA output?
>
>> -// { dg-final { scan-assembler-times "DW_AT_name: \"not_emitted\"" 1 } }
>
> This is just looking at an assembler comment, right?

The -f{,no-}merge-debug-strings -dA output changes look usually like:

-	.long	.LASF2	# DW_AT_name: "/tmp/zz.c"
+	.ascii "/tmp/zz.c\0"	# DW_AT_name

(when using .debug_str and the name (or other string) is long enough, the
section contains just reference to .debug_str string and comment contains
the actual string for better readability.  When not using .debug_str for the
string, the string is in the section itself and isn't duplicated in the asm
comment (would be redundant).  See
        case dw_val_class_str:
          if (AT_string_form (a) == DW_FORM_strp)
            dw2_asm_output_offset (DWARF_OFFSET_SIZE,
                                   a->dw_attr_val.v.val_str->label,
                                   debug_str_section,
                                   "%s: \"%s\"", name, AT_string (a));
          else
            dw2_asm_output_nstring (AT_string (a), -1, "%s", name);
          break;
in output_die.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]