* linux-low.c (fetch_register, store_register): Make code

consistent, fix formatting.
This commit is contained in:
Maciej W. Rozycki 2011-12-06 23:09:08 +00:00
parent 7325beb467
commit 5027555691
2 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
* linux-low.c (fetch_register, store_register): Make code
consistent, fix formatting.
2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
* linux-low.c (usr_store_inferior_registers): Factor out code

View File

@ -3745,10 +3745,11 @@ fetch_register (struct regcache *regcache, int regno)
if (regaddr == -1)
return;
pid = lwpid_of (get_thread_lwp (current_inferior));
size = ((register_size (regno) + sizeof (PTRACE_XFER_TYPE) - 1)
& - sizeof (PTRACE_XFER_TYPE));
& -sizeof (PTRACE_XFER_TYPE));
buf = alloca (size);
pid = lwpid_of (get_thread_lwp (current_inferior));
for (i = 0; i < size; i += sizeof (PTRACE_XFER_TYPE))
{
errno = 0;
@ -3779,16 +3780,15 @@ store_register (struct regcache *regcache, int regno)
if (regno >= the_low_target.num_regs)
return;
if ((*the_low_target.cannot_store_register) (regno) == 1)
if ((*the_low_target.cannot_store_register) (regno))
return;
regaddr = register_addr (regno);
if (regaddr == -1)
return;
errno = 0;
size = (register_size (regno) + sizeof (PTRACE_XFER_TYPE) - 1)
& - sizeof (PTRACE_XFER_TYPE);
size = ((register_size (regno) + sizeof (PTRACE_XFER_TYPE) - 1)
& -sizeof (PTRACE_XFER_TYPE));
buf = alloca (size);
memset (buf, 0, size);