diff options
author | Mark Kettenis <kettenis@gnu.org> | 2002-06-09 16:06:48 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2002-06-09 16:06:48 +0000 |
commit | 82ea117a2975ec7939955aec3addbc588240c0db (patch) | |
tree | 9e5ddd64a3c1d06e46a7f738005c4b2d69c9cd02 /gdb | |
parent | 3c25f8c7b071182238e0833c72552ee0e72fd2ae (diff) | |
download | gdb-82ea117a2975ec7939955aec3addbc588240c0db.zip gdb-82ea117a2975ec7939955aec3addbc588240c0db.tar.gz gdb-82ea117a2975ec7939955aec3addbc588240c0db.tar.bz2 |
* i386-linux-nat.c (suppy_gregset): Don't supply
I386_LINUX_ORIG_EAX_REGNUM if there isn't room for it in GDB's
register cache.
(fill_gregset): Don't fetch it under the same circumstances.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/i386-linux-nat.c | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ecc6213..6bf38d8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2002-06-09 Mark Kettenis <kettenis@gnu.org> + + * i386-linux-nat.c (suppy_gregset): Don't supply + I386_LINUX_ORIG_EAX_REGNUM if there isn't room for it in GDB's + register cache. + (fill_gregset): Don't fetch it under the same circumstances. + 2002-06-09 Andrew Cagney <cagney@redhat.com> * Makefile.in (callback_h): Define. diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c index e20e894..222c614 100644 --- a/gdb/i386-linux-nat.c +++ b/gdb/i386-linux-nat.c @@ -311,7 +311,8 @@ supply_gregset (elf_gregset_t *gregsetp) for (i = 0; i < NUM_GREGS; i++) supply_register (i, (char *) (regp + regmap[i])); - supply_register (I386_LINUX_ORIG_EAX_REGNUM, (char *) (regp + ORIG_EAX)); + if (I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS) + supply_register (I386_LINUX_ORIG_EAX_REGNUM, (char *) (regp + ORIG_EAX)); } /* Fill register REGNO (if it is a general-purpose register) in @@ -328,7 +329,8 @@ fill_gregset (elf_gregset_t *gregsetp, int regno) if ((regno == -1 || regno == i)) regcache_collect (i, regp + regmap[i]); - if (regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM) + if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM) + && I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS) regcache_collect (I386_LINUX_ORIG_EAX_REGNUM, regp + ORIG_EAX); } |