mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 01:50:24 +08:00
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.
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user