This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] DW_OP_GNU_implicit_pointer binutils support, fix up DW_OP_call_ref


On Thu, Sep 09, 2010 at 12:43:53PM +0100, Jan Beulich wrote:
> > +	  if (dwarf_version == 2)
> > +	    {
> > +	      printf ("DW_OP_GNU_implicit_pointer: <0x%lx> %ld",
> > +		      (long) byte_get (data, pointer_size),
> > +		      read_leb128 (data + pointer_size, &bytes_read, 1));
> > +	      data += pointer_size + bytes_read;
> 
> Is this one wrongly adding bytes_read, ...
> 
> > +	    }
> > +	  else
> > +	    {
> > +	      printf ("DW_OP_GNU_implicit_pointer: <0x%lx> %ld",
> > +		      (long) byte_get (data, offset_size),
> > +		      read_leb128 (data + offset_size, &bytes_read, 1));
> > +	      data += offset_size;
> 
> ... or is the respective addition missing here?
> 
> > +	    }
> > +	  break;
> >  
> >  	  /* HP extensions.  */
> >  	case DW_OP_HP_is_value:

Oops, thanks for catching this.  I've actually tested only with -g -O2
on current trunk, not with -g -gdwarf-3 -O2, with the latter it obviously
didn't work.  Committed this follow-up as obvious.

2010-09-09  Jakub Jelinek  <jakub@redhat.com>

	* dwarf.c (decode_location_expression): Fix data adjustment
	for DW_OP_GNU_implicit_pointer in v3+.

--- binutils/dwarf.c	9 Sep 2010 10:18:12 -0000	1.75
+++ binutils/dwarf.c	9 Sep 2010 12:06:16 -0000
@@ -1122,7 +1122,7 @@ decode_location_expression (unsigned cha
 	      printf ("DW_OP_GNU_implicit_pointer: <0x%lx> %ld",
 		      (long) byte_get (data, offset_size),
 		      read_leb128 (data + offset_size, &bytes_read, 1));
-	      data += offset_size;
+	      data += offset_size + bytes_read;
 	    }
 	  break;
 


	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]