aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-02-26 19:23:17 +0000
committerDaniel Jacobowitz <drow@false.org>2007-02-26 19:23:17 +0000
commitbaef701fc2712c0e7119fc5e7996b15af154e88b (patch)
tree6957d1a689f2aab058b6d7fbce11cd111aeebdc3 /gdb/remote.c
parent05a4558a934667e0e219e95d2c898f5c069b860c (diff)
downloadgdb-baef701fc2712c0e7119fc5e7996b15af154e88b.zip
gdb-baef701fc2712c0e7119fc5e7996b15af154e88b.tar.gz
gdb-baef701fc2712c0e7119fc5e7996b15af154e88b.tar.bz2
* remote.c (init_remote_state): Add special handling for placeholder
registers.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index bb49aca..f106c5d 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -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;
}