diff options
author | wood <wood@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-04-29 10:28:21 +0000 |
---|---|---|
committer | wood <wood@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-04-29 10:28:21 +0000 |
commit | 4e9830fee3ac9fa15d04d75787c39be9e2c4866c (patch) | |
tree | 754419a509752a8986e0886fb434bacb03130a97 /gcc/dwarfout.c | |
parent | c70c198ef2fef51ed27a9d48da02eb856f0c4fd5 (diff) | |
download | gcc-4e9830fee3ac9fa15d04d75787c39be9e2c4866c.tar.gz |
*** empty log message ***
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@858 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarfout.c')
-rw-r--r-- | gcc/dwarfout.c | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index ad6750c5b05..72d86ce1b41 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -1563,7 +1563,7 @@ data_member_location_attribute (decl) it into a member-style AT_location descriptor, but that'll be tough to do. -- rfg */ - if (TREE_CODE (bitpos) != CONST_INT) + if (TREE_CODE (bitpos) != INTEGER_CST) return; ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_location); @@ -1608,8 +1608,7 @@ data_member_location_attribute (decl) this minor annoyance. */ - if ((GET_MODE_ALIGNMENT (mode_for_size (containing_object_size_in_bits)) - != containing_object_size_in_bits) + if ((GET_MODE_ALIGNMENT (TYPE_MODE (type)) != containing_object_size_in_bits) && (DECL_BIT_FIELD_TYPE (type) != NULL)) warning_with_decl (decl, "debugging info won't necessarily be reliable"); @@ -1773,8 +1772,11 @@ inline void name_attribute (name_string) register char *name_string; { - ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_name); - ASM_OUTPUT_DWARF_STRING (asm_out_file, name_string); + if (name_string && *name_string) + { + ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_name); + ASM_OUTPUT_DWARF_STRING (asm_out_file, name_string); + } } inline void @@ -2064,8 +2066,7 @@ bit_offset_attribute (decl) */ #if 0 - if (GET_MODE_ALIGNMENT (mode_for_size (containing_object_size_in_bits)) - != containing_object_size_in_bits) + if (GET_MODE_ALIGNMENT (TYPE_MODE (type)) != containing_object_size_in_bits) warning_with_decl (decl, "debugging info won't necessarily be reliable"); #endif @@ -2297,11 +2298,9 @@ src_coords_attribute (src_fileno, src_lineno) register unsigned src_fileno; register unsigned src_lineno; { -#ifdef DWARF_DECL_COORDINATES ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_src_coords); ASM_OUTPUT_DWARF_DATA2 (asm_out_file, src_fileno); ASM_OUTPUT_DWARF_DATA2 (asm_out_file, src_lineno); -#endif } /************************* end of attributes *****************************/ @@ -2320,8 +2319,27 @@ name_and_src_coords_attributes (decl) if (decl_name && IDENTIFIER_POINTER (decl_name)) { name_attribute (IDENTIFIER_POINTER (decl_name)); - src_coords_attribute (lookup_filename (DECL_SOURCE_FILE (decl)), - DECL_SOURCE_LINE (decl)); +#ifdef DWARF_DECL_COORDINATES + { + register unsigned file_index; + + /* This is annoying, but we have to pop out of the .debug section + for a moment while we call `lookup_filename' because calling it + may cause a temporary switch into the .debug_sfnames section and + most svr4 assemblers are not smart enough be be able to nest + section switches to any depth greater than one. Note that we + also can't skirt this issue by delaying all output to the + .debug_sfnames section unit the end of compilation because that + would cause us to have inter-section forward references and + Fred Fish sez that m68k/svr4 assemblers botch those. */ + + ASM_OUTPUT_POP_SECTION (asm_out_file); + file_index = lookup_filename (DECL_SOURCE_FILE (decl)); + ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SECTION); + + src_coords_attribute (file_index, DECL_SOURCE_LINE (decl)); + } +#endif } } |