From: Daniel Jacobowitz Date: Mon, 26 Feb 2007 19:23:17 +0000 (+0000) Subject: * remote.c (init_remote_state): Add special handling for placeholder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=baef701fc2712c0e7119fc5e7996b15af154e88b;p=binutils-gdb.git * remote.c (init_remote_state): Add special handling for placeholder registers. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bd195598206..7c0eb5531a5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2007-02-26 Daniel Jacobowitz + + * remote.c (init_remote_state): Add special handling for placeholder + registers. + 2007-02-26 Daniel Jacobowitz * Makefile.in (XMLFILES): Include $(TDEP_XML). diff --git a/gdb/remote.c b/gdb/remote.c index bb49aca9b9c..f106c5de738 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; }