* linux-low.c (usr_store_inferior_registers): Factor out code
to handle individual registers into... (store_register): ... this new function.
This commit is contained in:
parent
2c21c232ac
commit
7325beb467
|
@ -1,3 +1,9 @@
|
|||
2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
|
||||
|
||||
* linux-low.c (usr_store_inferior_registers): Factor out code
|
||||
to handle individual registers into...
|
||||
(store_register): ... this new function.
|
||||
|
||||
2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
|
||||
|
|
|
@ -3768,30 +3768,15 @@ fetch_register (struct regcache *regcache, int regno)
|
|||
supply_register (regcache, regno, buf);
|
||||
}
|
||||
|
||||
/* Fetch all registers, or just one, from the child process. */
|
||||
/* Store one register. */
|
||||
static void
|
||||
usr_fetch_inferior_registers (struct regcache *regcache, int regno)
|
||||
{
|
||||
if (regno == -1)
|
||||
for (regno = 0; regno < the_low_target.num_regs; regno++)
|
||||
fetch_register (regcache, regno);
|
||||
else
|
||||
fetch_register (regcache, regno);
|
||||
}
|
||||
|
||||
/* Store our register values back into the inferior.
|
||||
If REGNO is -1, do this for all registers.
|
||||
Otherwise, REGNO specifies which register (so we can save time). */
|
||||
static void
|
||||
usr_store_inferior_registers (struct regcache *regcache, int regno)
|
||||
store_register (struct regcache *regcache, int regno)
|
||||
{
|
||||
CORE_ADDR regaddr;
|
||||
int i, size;
|
||||
char *buf;
|
||||
int pid;
|
||||
|
||||
if (regno >= 0)
|
||||
{
|
||||
if (regno >= the_low_target.num_regs)
|
||||
return;
|
||||
|
||||
|
@ -3835,10 +3820,30 @@ usr_store_inferior_registers (struct regcache *regcache, int regno)
|
|||
}
|
||||
regaddr += sizeof (PTRACE_XFER_TYPE);
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
/* Fetch all registers, or just one, from the child process. */
|
||||
static void
|
||||
usr_fetch_inferior_registers (struct regcache *regcache, int regno)
|
||||
{
|
||||
if (regno == -1)
|
||||
for (regno = 0; regno < the_low_target.num_regs; regno++)
|
||||
usr_store_inferior_registers (regcache, regno);
|
||||
fetch_register (regcache, regno);
|
||||
else
|
||||
fetch_register (regcache, regno);
|
||||
}
|
||||
|
||||
/* Store our register values back into the inferior.
|
||||
If REGNO is -1, do this for all registers.
|
||||
Otherwise, REGNO specifies which register (so we can save time). */
|
||||
static void
|
||||
usr_store_inferior_registers (struct regcache *regcache, int regno)
|
||||
{
|
||||
if (regno == -1)
|
||||
for (regno = 0; regno < the_low_target.num_regs; regno++)
|
||||
store_register (regcache, regno);
|
||||
else
|
||||
store_register (regcache, regno);
|
||||
}
|
||||
#endif /* HAVE_LINUX_USRREGS */
|
||||
|
||||
|
|
Loading…
Reference in New Issue