public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [patch] Print register names also for DWARF loc/expr
@ 2010-07-23  8:37 Jan Kratochvil
  2010-07-23  9:11 ` Jakub Jelinek
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kratochvil @ 2010-07-23  8:37 UTC (permalink / raw)
  To: binutils

Hi,

currently this DWARF (~ELF) output is perfectly readable:
	Contents of the .eh_frame section:
	  DW_CFA_offset: r3 (rbx) at cfa-40
	  DW_CFA_offset: r6 (rbp) at cfa-32

But this variant of output has still difficult to parse numbers->registers:
Contents of the .debug_loc section:
    Offset   Begin    End      Expression
    000002d4 00000000004015d5 00000000004015d9 (DW_OP_breg0: 0; DW_OP_lit3; DW_OP_shl; DW_OP_breg3: 0; DW_OP_plus; DW_OP_plus_uconst: 8)
    000002d4 00000000004015d9 0000000000401622 (DW_OP_reg6)
    000002d4 <End of list>
    <fc1>   DW_AT_location    : 1 byte block: 55        (DW_OP_reg5)

Provided patch will print instead:
    Offset   Begin    End      Expression
    000002d4 00000000004015d5 00000000004015d9 (DW_OP_breg0: (rax) 0; DW_OP_lit3; DW_OP_shl; DW_OP_breg3: (rbx) 0; DW_OP_plus; DW_OP_plus_uconst: 8)
    000002d4 00000000004015d9 0000000000401622 (DW_OP_reg6 (rbp))
    000002d4 <End of list>
    <fc1>   DW_AT_location    : 1 byte block: 55        (DW_OP_reg5 (rdi))

I really do not mind about the specific syntax but I miss the register names.

No regressions on {x86_64,i686}-fedora13-linux-gnu native host builds.
No regressions on x86_64-fedora13-linux-gnu host built each time with these
targets:
alpha-dec-vms alpha-linux-gnu alpha-netbsd alpha-unknown-freebsd4.7
alpha-unknown-osf4.0 am33_2.0-linux arc-elf arm-aout arm-eabi arm-elf
arm-epoc-pe arm-netbsdelf arm-nto arm-pe arm-rtems arm-vxworks arm-wince-pe
avr-elf bfin-elf c4x-coff cr16-elf cris-elf crx-elf d10v-elf d30v-elf dlx-elf
fido-elf fr30-elf frv-elf frv-linux frv-uclinux h8300-elf hppa-linux-gnu
hppa64-hp-hpux11.11 hppa64-hp-hpux11.23 i386-elf i386-netware
i386-unknown-go32 i686-pc-cygwin i686-pc-elf i686-pc-linux-gnu ia64-elf
ia64-hp-hpux11.23 ia64-linux ia64-linux-gnu ia64-x-freebsd5 ip2k-elf
iq2000-elf lm32-elf m32c-elf m32r-elf m68hc11-elf m68hc12-elf m68k-elf
m68k-linux-gnu m68k-rtems m68k-uclinux mcore-elf mcore-pe mep-elf mingw32-pe
mips-elf mips-sgi-irix5 mips-wrs-vxworks mips64-linux mips64vr-elf
mips64vrel-elf mipsel-linux-gnu mipsisa32-elf mipsisa64-elf mmix-elf
mmix-mmixware mn10200-elf mn10300-elf moxie-elf msp430-elf mt-elf ns32k-netbsd
openrisc-elf or32-elf pdp11-dec-bsd pj-elf powerpc-eabisim powerpc-eabispe
powerpc-elf powerpc-ibm-aix4.3.3.0 powerpc-linux-gnu powerpc-nto
powerpc-wrs-vxworks powerpc64-linux-gnu ppc-linux rs6000-aix4.3.3 s390-linux
s390x-ibm-tpf sh-elf sh-linux sh-nto sh-symbianelf sh64-elf
sh64-superh-linux-gnu shl-unknown-netbsdelf1.6T sparc-elf sparc-linux-gnu
sparc64-linux-gnu sparc64-netbsd spu-elf tic54x-coff tx39-elf v850-elf
v850e-elf vax-netbsdelf x86_64-linux x86_64-mingw32 x86_64-pc-linux-gnu
xscale-elf xstormy16-elf xtensa-elf z8k-coff


Thanks,
Jan


binutils/
2010-07-23  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* dwarf.c (regname): New declaration.
	(decode_location_expression): Print also the regname output.

binutils/testsuite/
2010-07-23  Jan Kratochvil  <jan.kratochvil@redhat.com>

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

gas/testsuite/
2010-07-23  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.

--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -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;
--- a/binutils/testsuite/binutils-all/objdump.W
+++ b/binutils/testsuite/binutils-all/objdump.W
@@ -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	
--- a/gas/testsuite/gas/elf/dwarf2-1.d
+++ b/gas/testsuite/gas/elf/dwarf2-1.d
@@ -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	
--- a/gas/testsuite/gas/elf/dwarf2-2.d
+++ b/gas/testsuite/gas/elf/dwarf2-2.d
@@ -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	
--- a/gas/testsuite/gas/i386/dw2-compress-1.d
+++ b/gas/testsuite/gas/i386/dw2-compress-1.d
@@ -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	

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] Print register names also for DWARF loc/expr
  2010-07-23  8:37 [patch] Print register names also for DWARF loc/expr Jan Kratochvil
@ 2010-07-23  9:11 ` Jakub Jelinek
  2010-07-23  9:31   ` Jan Kratochvil
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2010-07-23  9:11 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: binutils

On Fri, Jul 23, 2010 at 10:37:10AM +0200, Jan Kratochvil wrote:
> currently this DWARF (~ELF) output is perfectly readable:
> 	Contents of the .eh_frame section:
> 	  DW_CFA_offset: r3 (rbx) at cfa-40
> 	  DW_CFA_offset: r6 (rbp) at cfa-32
> 
> But this variant of output has still difficult to parse numbers->registers:
> Contents of the .debug_loc section:
>     Offset   Begin    End      Expression
>     000002d4 00000000004015d5 00000000004015d9 (DW_OP_breg0: 0; DW_OP_lit3; DW_OP_shl; DW_OP_breg3: 0; DW_OP_plus; DW_OP_plus_uconst: 8)
>     000002d4 00000000004015d9 0000000000401622 (DW_OP_reg6)
>     000002d4 <End of list>
>     <fc1>   DW_AT_location    : 1 byte block: 55        (DW_OP_reg5)
> 
> Provided patch will print instead:
>     Offset   Begin    End      Expression
>     000002d4 00000000004015d5 00000000004015d9 (DW_OP_breg0: (rax) 0; DW_OP_lit3; DW_OP_shl; DW_OP_breg3: (rbx) 0; DW_OP_plus; DW_OP_plus_uconst: 8)
>     000002d4 00000000004015d9 0000000000401622 (DW_OP_reg6 (rbp))
>     000002d4 <End of list>
>     <fc1>   DW_AT_location    : 1 byte block: 55        (DW_OP_reg5 (rdi))

I think it would be nicer if DW_OP_bregN printed the register name
before : instead of after it, so
DW_OP_breg0 (rax): 0
instead of
DW_OP_breg0: (rax) 0
because the register is part of the opcode, rather than its operand.

	Jakub

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch] Print register names also for DWARF loc/expr
  2010-07-23  9:11 ` Jakub Jelinek
@ 2010-07-23  9:31   ` Jan Kratochvil
  2010-09-02 14:28     ` ping: " Jan Kratochvil
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kratochvil @ 2010-07-23  9:31 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: binutils

On Fri, 23 Jul 2010 11:10:53 +0200, Jakub Jelinek wrote:
> I think it would be nicer if DW_OP_bregN printed the register name
> before : instead of after it, so
> DW_OP_breg0 (rax): 0
> instead of
> DW_OP_breg0: (rax) 0
> because the register is part of the opcode, rather than its operand.

OK.


Thanks,
Jan


binutils/
2010-07-23  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.

binutils/testsuite/
2010-07-23  Jan Kratochvil  <jan.kratochvil@redhat.com>

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

gas/testsuite/
2010-07-23  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.

--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -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;
--- a/binutils/testsuite/binutils-all/objdump.W
+++ b/binutils/testsuite/binutils-all/objdump.W
@@ -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	
--- a/gas/testsuite/gas/elf/dwarf2-1.d
+++ b/gas/testsuite/gas/elf/dwarf2-1.d
@@ -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	
--- a/gas/testsuite/gas/elf/dwarf2-2.d
+++ b/gas/testsuite/gas/elf/dwarf2-2.d
@@ -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	
--- a/gas/testsuite/gas/i386/dw2-compress-1.d
+++ b/gas/testsuite/gas/i386/dw2-compress-1.d
@@ -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	

^ permalink raw reply	[flat|nested] 6+ messages in thread

* ping: [patch] Print register names also for DWARF loc/expr
  2010-07-23  9:31   ` Jan Kratochvil
@ 2010-09-02 14:28     ` Jan Kratochvil
  2010-09-03 12:24       ` Alan Modra
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Kratochvil @ 2010-09-02 14:28 UTC (permalink / raw)
  To: binutils

Hi,

ping, original post/description/testing:
	http://sourceware.org/ml/binutils/2010-07/msg00374.html

Provided patch will print:
    Offset   Begin    End      Expression
    000002d4 00000000004015d5 00000000004015d9 (DW_OP_breg0 (rax): 0; DW_OP_lit3; DW_OP_shl; DW_OP_breg3 (rbx): 0; DW_OP_plus; DW_OP_plus_uconst: 8)
    000002d4 00000000004015d9 0000000000401622 (DW_OP_reg6 (rbp))
    000002d4 <End of list>
    <fc1>   DW_AT_location    : 1 byte block: 55        (DW_OP_reg5 (rdi))


Thanks,
Jan

	
On Fri, 23 Jul 2010 11:31:28 +0200, Jan Kratochvil wrote:

binutils/
2010-07-23  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.

binutils/testsuite/
2010-07-23  Jan Kratochvil  <jan.kratochvil@redhat.com>

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

gas/testsuite/
2010-07-23  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.

--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -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;
--- a/binutils/testsuite/binutils-all/objdump.W
+++ b/binutils/testsuite/binutils-all/objdump.W
@@ -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	
--- a/gas/testsuite/gas/elf/dwarf2-1.d
+++ b/gas/testsuite/gas/elf/dwarf2-1.d
@@ -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	
--- a/gas/testsuite/gas/elf/dwarf2-2.d
+++ b/gas/testsuite/gas/elf/dwarf2-2.d
@@ -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	
--- a/gas/testsuite/gas/i386/dw2-compress-1.d
+++ b/gas/testsuite/gas/i386/dw2-compress-1.d
@@ -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	

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ping: [patch] Print register names also for DWARF loc/expr
  2010-09-02 14:28     ` ping: " Jan Kratochvil
@ 2010-09-03 12:24       ` Alan Modra
  2010-09-03 15:56         ` Jan Kratochvil
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Modra @ 2010-09-03 12:24 UTC (permalink / raw)
  To: Jan Kratochvil; +Cc: binutils

On Thu, Sep 02, 2010 at 04:28:22PM +0200, Jan Kratochvil wrote:
> binutils/
> 2010-07-23  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.
> 
> binutils/testsuite/
> 2010-07-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
> 
> 	* binutils-all/objdump.W: Update DW_OP_reg5 expected output.
> 
> gas/testsuite/
> 2010-07-23  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.

OK.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ping: [patch] Print register names also for DWARF loc/expr
  2010-09-03 12:24       ` Alan Modra
@ 2010-09-03 15:56         ` Jan Kratochvil
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Kratochvil @ 2010-09-03 15:56 UTC (permalink / raw)
  To: binutils; +Cc: Jakub Jelinek

On Fri, 03 Sep 2010 14:24:06 +0200, Alan Modra wrote:
> On Thu, Sep 02, 2010 at 04:28:22PM +0200, Jan Kratochvil wrote:
> > binutils/
> > 2010-07-23  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.
> > 
> > binutils/testsuite/
> > 2010-07-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
> > 
> > 	* binutils-all/objdump.W: Update DW_OP_reg5 expected output.
> > 
> > gas/testsuite/
> > 2010-07-23  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.
> 
> OK.

Checked-in:
	http://sourceware.org/ml/binutils-cvs/2010-09/msg00017.html

I have not rerun the testsuite on all arches but there was no \<DW_OP_ string
in the diff since the time of the original testsuite runs.


Thanks,
Jan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-09-03 15:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-23  8:37 [patch] Print register names also for DWARF loc/expr Jan Kratochvil
2010-07-23  9:11 ` Jakub Jelinek
2010-07-23  9:31   ` Jan Kratochvil
2010-09-02 14:28     ` ping: " Jan Kratochvil
2010-09-03 12:24       ` Alan Modra
2010-09-03 15:56         ` Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).