rpms/gdb/devel gdb-6.3-dwoppieceread-20050407.patch, NONE, 1.1 gdb.spec, 1.140, 1.141 gdb-6.3-dwoppiecewarning-20041202.patch, 1.3, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Apr 8 19:16:54 UTC 2005


Update of /cvs/dist/rpms/gdb/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv30120

Modified Files:
	gdb.spec 
Added Files:
	gdb-6.3-dwoppieceread-20050407.patch 
Removed Files:
	gdb-6.3-dwoppiecewarning-20041202.patch 
Log Message:
* Fri Apr 8 2005 Andrew Cagney <cagney at redhat.com>   	6.3.0.0-1.11
- Replace patch warning about DW_OP_piece with a patch that implements
  the DW_OP_piece read path.


gdb-6.3-dwoppieceread-20050407.patch:
 dwarf2loc.c |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)

--- NEW FILE gdb-6.3-dwoppieceread-20050407.patch ---
Index: ./gdb/ChangeLog
2005-04-05  Andrew Cagney  <cagney at gnu.org>

	* dwarf2loc.c (dwarf2_evaluate_loc_desc): Handle DW_OP_piece
	reads.

--- gdb-6.3/gdb/dwarf2loc.c.dist	2005-04-08 11:18:21.000000000 -0400
+++ gdb-6.3/gdb/dwarf2loc.c	2005-04-08 11:19:28.000000000 -0400
@@ -230,11 +230,27 @@
   dwarf_expr_eval (ctx, data, size);
   if (ctx->num_pieces > 0)
     {
-      /* We haven't implemented splicing together pieces from
-         arbitrary sources yet.  */
-      error ("The value of variable '%s' is distributed across several\n"
-             "locations, and GDB cannot access its value.\n",
-             SYMBOL_NATURAL_NAME (var));
+      int i;
+      long offset = 0;
+      bfd_byte *contents;
+      retval = allocate_value (SYMBOL_TYPE (var));
+      contents = VALUE_CONTENTS_RAW (retval);
+      for (i = 0; i < ctx->num_pieces; i++)
+	{
+	  struct dwarf_expr_piece *p = &ctx->pieces[i];
+	  if (p->in_reg)
+	    {
+	      bfd_byte regval[MAX_REGISTER_SIZE];
+	      int gdb_regnum = DWARF2_REG_TO_REGNUM (p->value);
+	      get_frame_register (frame, gdb_regnum, regval);
+	      memcpy (contents + offset, regval, p->size);
+	    }
+	  else /* In memory?  */
+	    {
+	      read_memory (p->value, contents + offset, p->size);
+	    }
+	  offset += p->size;
+	}
     }
   else if (ctx->in_reg)
     {


Index: gdb.spec
===================================================================
RCS file: /cvs/dist/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -r1.140 -r1.141
--- gdb.spec	2 Apr 2005 22:38:09 -0000	1.140
+++ gdb.spec	8 Apr 2005 19:16:52 -0000	1.141
@@ -52,10 +52,6 @@
 
 # Add fixes starting at 100
 
-# Just issue a warning when DW_OP_piece.  Stops GDB falling on the
-# floor.
-Patch100: gdb-6.3-dwoppiecewarning-20041202.patch
-
 # Recognize i386 signal trampolines before CFI.  Ensures that signal
 # frames are identified as signal frames.
 Patch101: gdb-6.3-sigx86-20040621.patch
@@ -208,6 +204,9 @@
 Patch150: gdb-6.3-test-sepcrc-20050402.patch
 Patch151: gdb-6.3-sepcrc-20050402.patch
 
+# Handle read side of DW_OP_piece.
+Patch152: gdb-6.3-dwoppieceread-20050407.patch
+
 %ifarch ia64
 BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu libunwind >= 0.96-3
 %else
@@ -240,7 +239,6 @@
 %patch3 -p1
 %patch4 -p1
 
-%patch100 -p1
 %patch101 -p1
 %patch102 -p1
 %patch103 -p1
@@ -292,6 +290,7 @@
 %patch149 -p1
 %patch150 -p1
 %patch151 -p1
+%patch152 -p1
 
 # Change the version that gets printed at GDB startup, so it is RedHat
 # specific.
@@ -460,6 +459,10 @@
 # don't include the files in include, they are part of binutils
 
 %changelog
+* Fri Apr 8 2005 Andrew Cagney <cagney at redhat.com>   	6.3.0.0-1.11
+- Replace patch warning about DW_OP_piece with a patch that implements
+  the DW_OP_piece read path.
+
 * Sat Apr 2 2005 Andrew Cagney <cagney at redhat.com>   	6.3.0.0-1.10
 - Print a warning when the separate debug info's CRC doen't match;
   test.


--- gdb-6.3-dwoppiecewarning-20041202.patch DELETED ---




More information about the fedora-cvs-commits mailing list