This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] ARI fixes for i386fbsd-tdep.c
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 10 Aug 2003 18:46:10 +0200 (CEST)
- Subject: [PATCH] ARI fixes for i386fbsd-tdep.c
Checked in on mainline.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* i386fbsd-nat.c: Include "i386-tdep.h".
(child_resume): Make `eflags' an ULONGEST. Use
regcache_cooked_read_unsigned and regcache_cooked_write_unsigned
instead of register_read and register_write.
Index: i386fbsd-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386fbsd-nat.c,v
retrieving revision 1.2
diff -u -p -r1.2 i386fbsd-nat.c
--- i386fbsd-nat.c 14 Jun 2002 19:42:19 -0000 1.2
+++ i386fbsd-nat.c 10 Aug 2003 16:45:00 -0000
@@ -26,6 +26,8 @@
#include <sys/ptrace.h>
#include <sys/sysctl.h>
+#include "i386-tdep.h"
+
/* Prevent warning from -Wmissing-prototypes. */
void _initialize_i386fbsd_nat (void);
@@ -47,7 +49,7 @@ child_resume (ptid_t ptid, int step, enu
if (!step)
{
- unsigned int eflags;
+ ULONGEST eflags;
/* Workaround for a bug in FreeBSD. Make sure that the trace
flag is off when doing a continue. There is a code path
@@ -59,9 +61,11 @@ child_resume (ptid_t ptid, int step, enu
never goes through the kernel's trap() function which would
normally clear it. */
- eflags = read_register (PS_REGNUM);
+ regcache_cooked_read_unsigned (current_regcache, I386_EFLAGS_REGNUM,
+ &eflags);
if (eflags & 0x0100)
- write_register (PS_REGNUM, eflags & ~0x0100);
+ regcache_cooked_write_unsigned (current_regcache, I386_EFLAGS_REGNUM,
+ eflags & ~0x0100);
request = PT_CONTINUE;
}