aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2001-11-04 14:30:42 +0000
committerMark Kettenis <kettenis@gnu.org>2001-11-04 14:30:42 +0000
commit3fb1c838041ad54d9182dc91b0304bfbd55968cb (patch)
tree2a5e90f9abfd488dc288e74066198be1df691623 /gdb
parent6441c4a0260879c97d9116b3d0791224c1ad807b (diff)
downloadgdb-3fb1c838041ad54d9182dc91b0304bfbd55968cb.zip
gdb-3fb1c838041ad54d9182dc91b0304bfbd55968cb.tar.gz
gdb-3fb1c838041ad54d9182dc91b0304bfbd55968cb.tar.bz2
* i386-linux-nat.c (GETREGS_SUPPLIES, supply_gregset,
fill_gregset): Add support for "orig_eax" register.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/i386-linux-nat.c7
2 files changed, 9 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e1aac69..a571e1b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2001-11-04 Mark Kettenis <kettenis@gnu.org>
+ * i386-linux-nat.c (GETREGS_SUPPLIES, supply_gregset,
+ fill_gregset): Add support for "orig_eax" register.
+
Add support for "orig_eax" pseudo register on Linux/x86.
* i386-linux-tdep.c: Include "inferior.h".
(i386_linux_register_name, i386_linux_register_byte,
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index 94d9ab3..a9a1fc6 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -88,7 +88,7 @@ static int regmap[] =
/* Which ptrace request retrieves which registers?
These apply to the corresponding SET requests as well. */
#define GETREGS_SUPPLIES(regno) \
- (0 <= (regno) && (regno) <= 15)
+ ((0 <= (regno) && (regno) <= 15) || (regno) == I386_LINUX_ORIG_EAX_REGNUM)
#define GETFPREGS_SUPPLIES(regno) \
(FP0_REGNUM <= (regno) && (regno) <= LAST_FPU_CTRL_REGNUM)
#define GETFPXREGS_SUPPLIES(regno) \
@@ -306,6 +306,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));
}
/* Fill register REGNO (if it is a general-purpose register) in
@@ -321,6 +323,9 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
for (i = 0; i < NUM_GREGS; i++)
if ((regno == -1 || regno == i))
*(regp + regmap[i]) = *(elf_greg_t *) &registers[REGISTER_BYTE (i)];
+
+ if (regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
+ read_register_gen (I386_LINUX_ORIG_EAX_REGNUM, (char *) (regp + ORIG_EAX));
}
#ifdef HAVE_PTRACE_GETREGS