binutils/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 3 Sep 2010 15:54:32 +0000 (15:54 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 3 Sep 2010 15:54:32 +0000 (15:54 +0000)
* dwarf.c (regname): New declaration.
(decode_location_expression): Print for registers also regname output.

binutils/testsuite/
* binutils-all/objdump.W: Update DW_OP_reg5 expected output.

gas/testsuite/
* gas/elf/dwarf2-1.d: Update DW_OP_reg5 expected output.
* gas/elf/dwarf2-2.d: Likewise.
* gas/i386/dw2-compress-1.d: Likewise.

binutils/ChangeLog
binutils/dwarf.c
binutils/testsuite/ChangeLog
binutils/testsuite/binutils-all/objdump.W
gas/testsuite/ChangeLog
gas/testsuite/gas/elf/dwarf2-1.d
gas/testsuite/gas/elf/dwarf2-2.d
gas/testsuite/gas/i386/dw2-compress-1.d

index c3f12785cdc5925df77017428b0fd3084b922a07..fa83d02504a9dba05656a0914ab347660de9950b 100644 (file)
@@ -1,3 +1,9 @@
+2010-09-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
+           Jakub Jelinek  <jakub@redhat.com>
+
+       * dwarf.c (regname): New declaration.
+       (decode_location_expression): Print for registers also regname output.
+
 2010-09-02  Richard Henderson  <rth@redhat.com>
 
        * dwarf.c (init_dwarf_regnames_i386, init_dwarf_regnames_x86_64): New.
index 1d2679befcd670afe39648e11a3b31b734be6d03..599c0d2ba81d03863c5f4018f65ba550312519af 100644 (file)
@@ -27,6 +27,8 @@
 #include "dwarf2.h"
 #include "dwarf.h"
 
+static const char *regname (unsigned int regno, int row);
+
 static int have_frame_base;
 static int need_base_address;
 
@@ -936,7 +938,8 @@ decode_location_expression (unsigned char * data,
        case DW_OP_reg29:
        case DW_OP_reg30:
        case DW_OP_reg31:
-         printf ("DW_OP_reg%d", op - DW_OP_reg0);
+         printf ("DW_OP_reg%d (%s)", op - DW_OP_reg0,
+                 regname (op - DW_OP_reg0, 1));
          break;
 
        case DW_OP_breg0:
@@ -971,14 +974,16 @@ decode_location_expression (unsigned char * data,
        case DW_OP_breg29:
        case DW_OP_breg30:
        case DW_OP_breg31:
-         printf ("DW_OP_breg%d: %ld", op - DW_OP_breg0,
+         printf ("DW_OP_breg%d (%s): %ld", op - DW_OP_breg0,
+                 regname (op - DW_OP_breg0, 1),
                  read_leb128 (data, &bytes_read, 1));
          data += bytes_read;
          break;
 
        case DW_OP_regx:
-         printf ("DW_OP_regx: %lu", read_leb128 (data, &bytes_read, 0));
+         uvalue = read_leb128 (data, &bytes_read, 0);
          data += bytes_read;
+         printf ("DW_OP_regx: %lu (%s)", uvalue, regname (uvalue, 1));
          break;
        case DW_OP_fbreg:
          need_frame_base = 1;
@@ -988,7 +993,7 @@ decode_location_expression (unsigned char * data,
        case DW_OP_bregx:
          uvalue = read_leb128 (data, &bytes_read, 0);
          data += bytes_read;
-         printf ("DW_OP_bregx: %lu %ld", uvalue,
+         printf ("DW_OP_bregx: %lu (%s) %ld", uvalue, regname (uvalue, 1),
                  read_leb128 (data, &bytes_read, 1));
          data += bytes_read;
          break;
index 9299f9e9e7e332c3dfe87bb2cdf73892900de7e7..9e5e22da741331e1f9dce387d67f3d8b7233bfc0 100644 (file)
@@ -1,3 +1,7 @@
+2010-09-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * binutils-all/objdump.W: Update DW_OP_reg5 expected output.
+
 2010-08-23  H.J. Lu  <hongjiu.lu@intel.com>
 
        * binutils-all/elfedit-3.d: New.
index 5f65063e0774729c3552b89dbe9dd311ab413a65..8de584a0a832f99b108279dda88134c9751258d8 100644 (file)
@@ -23,7 +23,7 @@ Contents of the .debug_info section:
     <3c>   DW_AT_type        : <0x4a>  
     <40>   DW_AT_low_pc      : 0x.     
     <44>   DW_AT_high_pc     : 0x.     
-    <48>   DW_AT_frame_base  : 1 byte block: 55        \(DW_OP_reg5\)
+    <48>   DW_AT_frame_base  : 1 byte block: 55        \(DW_OP_reg5 \([^()]*\)\)
  <1><4a>: Abbrev Number: 3 \(DW_TAG_base_type\)
     <4b>   DW_AT_name        : int     
     <4f>   DW_AT_byte_size   : 4       
index 634f9e4d08f5a8b8a9c042054240c3af80c2475b..93c1b1d9623638e712548bd99d9018aba3b58176 100644 (file)
@@ -1,4 +1,10 @@
-2010-10-03  Kai Tietz  <kai.tietz@onevision.com>
+2010-09-03  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * gas/elf/dwarf2-1.d: Update DW_OP_reg5 expected output.
+       * gas/elf/dwarf2-2.d: Likewise.
+       * gas/i386/dw2-compress-1.d: Likewise.
+
+2010-09-03  Kai Tietz  <kai.tietz@onevision.com>
 
        * gas/cfi/cfi-i386.d: Use objdump -Wf instead of readelf.
        * gas/cfi/cfi-i386.s: Remove .type directives.
index f09d230a928bd32449addb30d62313bbcba9b9f3..076b01d734bba4f7aa123d67877e49315014ed08 100644 (file)
@@ -24,7 +24,7 @@ Contents of the .debug_info section:
     <3c>   DW_AT_type        : <0x4a>  
     <40>   DW_AT_low_pc      : 0x.     
     <44>   DW_AT_high_pc     : 0x.     
-    <48>   DW_AT_frame_base  : 1 byte block: 55        \(DW_OP_reg5\)
+    <48>   DW_AT_frame_base  : 1 byte block: 55        \(DW_OP_reg5 \([^()]*\)\)
  <1><4a>: Abbrev Number: 3 \(DW_TAG_base_type\)
     <4b>   DW_AT_name        : int     
     <4f>   DW_AT_byte_size   : 4       
index de8700452c1a330afe792c158c79d96007019db3..036aafcbbc974b8fa24c8eeff60b947dfaf852fc 100644 (file)
@@ -24,7 +24,7 @@ Contents of the .debug_info section:
     <3c>   DW_AT_type        : <0x4a>  
     <40>   DW_AT_low_pc      : 0x.     
     <44>   DW_AT_high_pc     : 0x.     
-    <48>   DW_AT_frame_base  : 1 byte block: 55        \(DW_OP_reg5\)
+    <48>   DW_AT_frame_base  : 1 byte block: 55        \(DW_OP_reg5 \([^()]*\)\)
  <1><4a>: Abbrev Number: 3 \(DW_TAG_base_type\)
     <4b>   DW_AT_name        : int     
     <4f>   DW_AT_byte_size   : 4       
index 1205ddfe7eb5ef5f1cecc55ca58ba5c152315c99..71c9c70675b16f52fc78ad5f5e3b3479930f192a 100644 (file)
@@ -24,7 +24,7 @@ Contents of the .zdebug_info section:
     <3c>   DW_AT_type        : <0x4a>  
     <40>   DW_AT_low_pc      : 0x0     
     <44>   DW_AT_high_pc     : 0x4     
-    <48>   DW_AT_frame_base  : 1 byte block: 55        \(DW_OP_reg5\)
+    <48>   DW_AT_frame_base  : 1 byte block: 55        \(DW_OP_reg5 \([^()]*\)\)
  <1><4a>: Abbrev Number: 3 \(DW_TAG_base_type\)
     <4b>   DW_AT_name        : int     
     <4f>   DW_AT_byte_size   : 4       
This page took 0.042276 seconds and 4 git commands to generate.