aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/regcache.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-02-27 07:07:49 +0000
committerDaniel Jacobowitz <drow@false.org>2002-02-27 07:07:49 +0000
commit58caa3dcdb43a5d66932182338f41df0bfd6cc98 (patch)
tree8932e0b600933a36f94b2668449ca3626bc0b5ac /gdb/gdbserver/regcache.c
parent936521746ce912bf28fbeb3be2a006f6ffe23929 (diff)
downloadgdb-58caa3dcdb43a5d66932182338f41df0bfd6cc98.zip
gdb-58caa3dcdb43a5d66932182338f41df0bfd6cc98.tar.gz
gdb-58caa3dcdb43a5d66932182338f41df0bfd6cc98.tar.bz2
2002-02-27 Daniel Jacobowitz <drow@mvista.com>
* gdbserver/acconfig.h: New file. * gdbserver/i387-fp.c: New file. * gdbserver/i387-fp.h: New file. * gdbserver/linux-x86-64.c: New file. * regformats/reg-x86-64.dat: New file. * configure.tgt: Add x86_64-*-linux* gdbserver support. & gdbserver/configure.srv: Add x86_64-*-linux* and regset support. * gdbserver/configure.in: Add support for regsets. * gdbserver/config.in: Regenerate. * gdbserver/configure: Regenerate. * gdbserver/Makefile.in: Likewise. Add $(linux_low_h). * gdbserver/linux-low.h: New file. * gdbserver/linux-low.c: Include "linux-low.h". Add support for regsets. * gdbserver/linux-arm-low.c: Include "linux-low.h". * gdbserver/linux-ia64-low.c: Include "linux-low.h". * gdbserver/linux-m68k-low.c: Include "linux-low.h". * gdbserver/linux-mips-low.c: Include "linux-low.h". * gdbserver/linux-ppc-low.c: Include "linux-low.h". * gdbserver/linux-sh-low.c: Include "linux-low.h". * gdbserver/linux-i386-low.c: Include "linux-low.h". Include "i387-fp.h". Add PTRACE_GETREGS and friends. * gdbserver/regcache.c (supply_register): New function. (supply_register_by_name): New function. (collect_register): New function. (collect_register_by_name): New function.
Diffstat (limited to 'gdb/gdbserver/regcache.c')
-rw-r--r--gdb/gdbserver/regcache.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/gdbserver/regcache.c b/gdb/gdbserver/regcache.c
index 551a71a..bec20bb 100644
--- a/gdb/gdbserver/regcache.c
+++ b/gdb/gdbserver/regcache.c
@@ -122,3 +122,26 @@ register_data (int n)
return registers + (reg_defs[n].offset / 8);
}
+void
+supply_register (int n, const char *buf)
+{
+ memcpy (register_data (n), buf, register_size (n));
+}
+
+void
+supply_register_by_name (const char *name, const char *buf)
+{
+ supply_register (find_regno (name), buf);
+}
+
+void
+collect_register (int n, char *buf)
+{
+ memcpy (buf, register_data (n), register_size (n));
+}
+
+void
+collect_register_by_name (const char *name, char *buf)
+{
+ collect_register (find_regno (name), buf);
+}