summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-08 22:33:18 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2000-06-08 22:33:18 +0000
commitfddebe760d15ee83175dec7a5606b805cf3754ac (patch)
tree956f42aebb68eeef0bdc8cd861854671d0f0dbfe /gcc/dwarf2out.c
parent62916867c4366cadb030b39179184c79771249f7 (diff)
downloadgcc-fddebe760d15ee83175dec7a5606b805cf3754ac.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34462 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 81230d0cac2..58be8c47616 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: