2007-06-18 Markus Deuling <deuling@de.ibm.com>
[deliverable/binutils-gdb.git] / gdb / i386fbsd-nat.c
index ec87bb852be52bbdbb2c671722b7e3f7fcf91e57..c3bdf53c3ebcee9dd3f7ade34d747d42f9d259a3 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for FreeBSD/i386.
 
-   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -49,6 +49,7 @@ i386fbsd_resume (ptid_t ptid, int step, enum target_signal signal)
 
   if (!step)
     {
+      struct regcache *regcache = get_current_regcache ();
       ULONGEST eflags;
 
       /* Workaround for a bug in FreeBSD.  Make sure that the trace
@@ -61,10 +62,10 @@ i386fbsd_resume (ptid_t ptid, int step, enum target_signal signal)
         never goes through the kernel's trap() function which would
         normally clear it.  */
 
-      regcache_cooked_read_unsigned (current_regcache, I386_EFLAGS_REGNUM,
+      regcache_cooked_read_unsigned (regcache, I386_EFLAGS_REGNUM,
                                     &eflags);
       if (eflags & 0x0100)
-       regcache_cooked_write_unsigned (current_regcache, I386_EFLAGS_REGNUM,
+       regcache_cooked_write_unsigned (regcache, I386_EFLAGS_REGNUM,
                                        eflags & ~0x0100);
 
       request = PT_CONTINUE;
This page took 0.025233 seconds and 4 git commands to generate.