diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-02-27 03:33:07 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-02-27 03:33:07 +0000 |
commit | ee1a7ae44068868a9351a2eef5d4be107bb8d024 (patch) | |
tree | ac345b39e9b1a50b027026edd9bd32f93e9734e9 /gdb/gdbserver/linux-low.c | |
parent | d61ddec43526d69a4625f46671b2c1b5bea9fa88 (diff) | |
download | gdb-ee1a7ae44068868a9351a2eef5d4be107bb8d024.zip gdb-ee1a7ae44068868a9351a2eef5d4be107bb8d024.tar.gz gdb-ee1a7ae44068868a9351a2eef5d4be107bb8d024.tar.bz2 |
* linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
by collect_ptrace_register and supply_ptrace_register hooks.
* linux-low.c (fetch_register): Use supply_ptrace_register callback
instead of checking for the_low_target.left_pad_xfer.
(usr_store_inferior_registers): Use collect_ptrace_register callback
instead of checking for the_low_target.left_pad_xfer.
* linux-s390-low.c (s390_collect_ptrace_register): New function.
(s390_supply_ptrace_register): Likewise.
(s390_fill_gregset): Call s390_collect_ptrace_register.
(the_low_target): Update.
* linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
(ppc_supply_ptrace_register): Likewise.
(the_low_target): Update.
* linux-i386-low.c (the_low_target): Update.
* linux-x86-64-low.c (the_low_target): Update.
Diffstat (limited to 'gdb/gdbserver/linux-low.c')
-rw-r--r-- | gdb/gdbserver/linux-low.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 732aafb..1d2b422 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -1401,10 +1401,9 @@ fetch_register (int regno) goto error_exit; } } - if (the_low_target.left_pad_xfer - && register_size (regno) < sizeof (PTRACE_XFER_TYPE)) - supply_register (regno, (buf + sizeof (PTRACE_XFER_TYPE) - - register_size (regno))); + + if (the_low_target.supply_ptrace_register) + the_low_target.supply_ptrace_register (regno, buf); else supply_register (regno, buf); @@ -1448,12 +1447,12 @@ usr_store_inferior_registers (int regno) & - sizeof (PTRACE_XFER_TYPE); buf = alloca (size); memset (buf, 0, size); - if (the_low_target.left_pad_xfer - && register_size (regno) < sizeof (PTRACE_XFER_TYPE)) - collect_register (regno, (buf + sizeof (PTRACE_XFER_TYPE) - - register_size (regno))); + + if (the_low_target.collect_ptrace_register) + the_low_target.collect_ptrace_register (regno, buf); else collect_register (regno, buf); + for (i = 0; i < size; i += sizeof (PTRACE_XFER_TYPE)) { errno = 0; |