OSDN Git Service

Emit correct debug info for 64-bit signed enums on 64-bit host.
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Jun 2000 22:33:18 +0000 (22:33 +0000)
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Jun 2000 22:33:18 +0000 (22:33 +0000)
* 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

gcc/ChangeLog
gcc/dwarf2out.c

index c3fb268..1971ecb 100644 (file)
@@ -1,3 +1,10 @@
+2000-06-08  James E. Wilson  <wilson@bletchleypark.cygnus.com>
+
+       * 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.
+
 2000-06-08  Mark Mitchell  <mark@codesourcery.com>
 
        * invoke.texi: Remove documentation for -fsquangle and
index 81230d0..58be8c4 100644 (file)
@@ -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: