mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-25 02:53:48 +08:00
* i386-linux-nat.c (fetch_register, store_register)
(supply_gregset, fill_gregset): Remove redundant casts.
This commit is contained in:
parent
e7bab58a7b
commit
3182884062
@ -1,3 +1,8 @@
|
||||
2005-08-13 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* i386-linux-nat.c (fetch_register, store_register)
|
||||
(supply_gregset, fill_gregset): Remove redundant casts.
|
||||
|
||||
2005-08-12 Kris Warkentin <kewarken@qnx.com>
|
||||
|
||||
* i386-nto-tdep.c (i386nto_init_abi): Don't set gdbarch skip
|
||||
|
@ -1,6 +1,7 @@
|
||||
/* Native-dependent code for GNU/Linux i386.
|
||||
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GDB.
|
||||
|
||||
@ -183,7 +184,7 @@ fetch_register (int regno)
|
||||
error (_("Couldn't read register %s (#%d): %s."), REGISTER_NAME (regno),
|
||||
regno, safe_strerror (errno));
|
||||
|
||||
regcache_raw_supply (current_regcache, regno, (gdb_byte *) &val);
|
||||
regcache_raw_supply (current_regcache, regno, &val);
|
||||
}
|
||||
|
||||
/* Store one register. */
|
||||
@ -204,7 +205,7 @@ store_register (int regno)
|
||||
tid = PIDGET (inferior_ptid); /* Not a threaded program. */
|
||||
|
||||
errno = 0;
|
||||
regcache_raw_collect (current_regcache, regno, (gdb_byte *) &val);
|
||||
regcache_raw_collect (current_regcache, regno, &val);
|
||||
ptrace (PTRACE_POKEUSER, tid, register_addr (regno, 0), val);
|
||||
if (errno != 0)
|
||||
error (_("Couldn't write register %s (#%d): %s."), REGISTER_NAME (regno),
|
||||
@ -225,11 +226,11 @@ supply_gregset (elf_gregset_t *gregsetp)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < I386_NUM_GREGS; i++)
|
||||
regcache_raw_supply (current_regcache, i, (gdb_byte *) (regp + regmap[i]));
|
||||
regcache_raw_supply (current_regcache, i, regp + regmap[i]);
|
||||
|
||||
if (I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
|
||||
regcache_raw_supply (current_regcache, I386_LINUX_ORIG_EAX_REGNUM,
|
||||
(gdb_byte *) (regp + ORIG_EAX));
|
||||
regp + ORIG_EAX);
|
||||
}
|
||||
|
||||
/* Fill register REGNO (if it is a general-purpose register) in
|
||||
@ -244,12 +245,12 @@ fill_gregset (elf_gregset_t *gregsetp, int regno)
|
||||
|
||||
for (i = 0; i < I386_NUM_GREGS; i++)
|
||||
if (regno == -1 || regno == i)
|
||||
regcache_raw_collect (current_regcache, i, (gdb_byte *) (regp + regmap[i]));
|
||||
regcache_raw_collect (current_regcache, i, regp + regmap[i]);
|
||||
|
||||
if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
|
||||
&& I386_LINUX_ORIG_EAX_REGNUM < NUM_REGS)
|
||||
regcache_raw_collect (current_regcache, I386_LINUX_ORIG_EAX_REGNUM,
|
||||
(gdb_byte *) (regp + ORIG_EAX));
|
||||
regp + ORIG_EAX);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PTRACE_GETREGS
|
||||
|
Loading…
Reference in New Issue
Block a user