diff options
author | Daniel Jacobowitz <drow@false.org> | 2008-11-14 22:06:41 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2008-11-14 22:06:41 +0000 |
commit | dfb64f85d3092829e65374a53572e2f009b3b5d4 (patch) | |
tree | fa6400c90fff42323dc72cbe815f48682426e1e8 /gdb/gdbserver/linux-low.c | |
parent | 28b027518b25acd2402dd136a078539e0de8e292 (diff) | |
download | gdb-dfb64f85d3092829e65374a53572e2f009b3b5d4.zip gdb-dfb64f85d3092829e65374a53572e2f009b3b5d4.tar.gz gdb-dfb64f85d3092829e65374a53572e2f009b3b5d4.tar.bz2 |
2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
* configure.tgt (sparc64-*-linux*): Added gdbserver support.
* regformats/reg-sparc64.dat: New file.
gdbserver/
2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
* Makefile.in (SFILES, clean): Added sparc64 files.
(reg-sparc64.o, reg-sparc64.c): New.
* configure.srv (sparc*-*-linux*): New configuration.
* linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
syscall arguments for SPARC.
(regsets_store_inferior_registers): Likewise.
* linux-sparc-low.c: New file.
Diffstat (limited to 'gdb/gdbserver/linux-low.c')
-rw-r--r-- | gdb/gdbserver/linux-low.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 722953e..4766cc9 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -1523,7 +1523,11 @@ regsets_fetch_inferior_registers () } buf = malloc (regset->size); +#ifndef __sparc__ res = ptrace (regset->get_request, inferior_pid, 0, buf); +#else + res = ptrace (regset->get_request, inferior_pid, buf, 0); +#endif if (res < 0) { if (errno == EIO) @@ -1576,7 +1580,11 @@ regsets_store_inferior_registers () /* First fill the buffer with the current register set contents, in case there are any items in the kernel's regset that are not in gdbserver's regcache. */ +#ifndef __sparc__ res = ptrace (regset->get_request, inferior_pid, 0, buf); +#else + res = ptrace (regset->get_request, inferior_pid, buf, 0); +#endif if (res == 0) { @@ -1584,7 +1592,11 @@ regsets_store_inferior_registers () regset->fill_function (buf); /* Only now do we write the register set. */ - res = ptrace (regset->set_request, inferior_pid, 0, buf); +#ifndef __sparc__ + res = ptrace (regset->set_request, inferior_pid, 0, buf); +#else + res = ptrace (regset->set_request, inferior_pid, buf, 0); +#endif } if (res < 0) |