diff options
author | James E. Wilson <wilson@bletchleypark.cygnus.com> | 2000-06-08 22:33:18 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2000-06-08 15:33:18 -0700 |
commit | 25dd13ece0ff96888ad87c1832b7cccda32ade1e (patch) | |
tree | 956f42aebb68eeef0bdc8cd861854671d0f0dbfe /gcc/dwarf2out.c | |
parent | 6c820cf2ec17eb1655f8729d67eb2cd0dc81699d (diff) | |
download | gcc-25dd13ece0ff96888ad87c1832b7cccda32ade1e.zip gcc-25dd13ece0ff96888ad87c1832b7cccda32ade1e.tar.gz gcc-25dd13ece0ff96888ad87c1832b7cccda32ade1e.tar.bz2 |
Emit correct debug info for 64-bit signed enums on 64-bit host.
* dwarf2out.c (size_of_die, case dw_val_class_const): Use
size_of_sleb128.
(value_format, case dw_val_class_const): Use sdata format.
(output_die): Call output_sleb128.
From-SVN: r34462
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 81230d0..58be8c4 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -4644,7 +4644,7 @@ size_of_die (die) } break; case dw_val_class_const: - size += 4; + size += size_of_sleb128 (AT_int (a)); break; case dw_val_class_unsigned_const: size += constant_size (AT_unsigned (a)); @@ -4801,7 +4801,7 @@ value_format (a) abort (); } case dw_val_class_const: - return DW_FORM_data4; + return DW_FORM_sdata; case dw_val_class_unsigned_const: switch (constant_size (AT_unsigned (a))) { @@ -5089,7 +5089,10 @@ output_die (die) break; case dw_val_class_const: - ASM_OUTPUT_DWARF_DATA4 (asm_out_file, AT_int (a)); + /* ??? It would be slightly more efficient to use a scheme like is + used for unsigned constants below, but gdb 4.x does not sign + extend. Gdb 5.x does sign extend. */ + output_sleb128 (AT_int (a)); break; case dw_val_class_unsigned_const: |