* remote.c (init_remote_state): Add special handling for placeholder
authorDaniel Jacobowitz <drow@false.org>
Mon, 26 Feb 2007 19:23:17 +0000 (19:23 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 26 Feb 2007 19:23:17 +0000 (19:23 +0000)
registers.

gdb/ChangeLog
gdb/remote.c

index bd195598206ca9c8847b7b659493e676e70c6deb..7c0eb5531a508bc2a2520161023f6a507e51891d 100644 (file)
@@ -1,3 +1,8 @@
+2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * remote.c (init_remote_state): Add special handling for placeholder
+       registers.
+
 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * Makefile.in (XMLFILES): Include $(TDEP_XML).
index bb49aca9b9c85334afc6fce30962e8bd6e40eff6..f106c5de738a2c1938002424b6cd4ad8d52a818b 100644 (file)
@@ -340,7 +340,13 @@ init_remote_state (struct gdbarch *gdbarch)
   for (regnum = 0; regnum < NUM_REGS; regnum++)
     {
       struct packet_reg *r = &rsa->regs[regnum];
-      r->pnum = gdbarch_remote_register_number (gdbarch, regnum);
+
+      if (register_size (current_gdbarch, regnum) == 0)
+       /* Do not try to fetch zero-sized (placeholder) registers.  */
+       r->pnum = -1;
+      else
+       r->pnum = gdbarch_remote_register_number (gdbarch, regnum);
+
       r->regnum = regnum;
     }