aboutsummaryrefslogtreecommitdiffstats
path: root/devel/gdb/files/patch-gdb-amd64fbsd-nat.c
diff options
context:
space:
mode:
authorskreuzer <skreuzer@FreeBSD.org>2010-11-17 04:39:48 +0800
committerskreuzer <skreuzer@FreeBSD.org>2010-11-17 04:39:48 +0800
commit7ad431a7e82d57d4afab6d747882ba86070e03cb (patch)
treeaa06ba9a79ad0779c9615dd96d87eab8f5709a44 /devel/gdb/files/patch-gdb-amd64fbsd-nat.c
parent3f5c6ce007882f6ec090afee1555d35647182919 (diff)
downloadfreebsd-ports-gnome-7ad431a7e82d57d4afab6d747882ba86070e03cb.tar.gz
freebsd-ports-gnome-7ad431a7e82d57d4afab6d747882ba86070e03cb.tar.zst
freebsd-ports-gnome-7ad431a7e82d57d4afab6d747882ba86070e03cb.zip
GDB is a source-level debugger for Ada, C, C++, Objective-C, Pascal and
many other languages. GDB can target (i.e., debug programs running on) more than a dozen different processor architectures, and GDB itself can run on most popular GNU/Linux, Unix and Microsoft Windows variants. This version of gdb has been modified by jhb@ to recognize freebsd threads Reviewed by: John Baldwin <jhb@FreeBSD.org>, swell.k@gmail.com
Diffstat (limited to 'devel/gdb/files/patch-gdb-amd64fbsd-nat.c')
-rw-r--r--devel/gdb/files/patch-gdb-amd64fbsd-nat.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/devel/gdb/files/patch-gdb-amd64fbsd-nat.c b/devel/gdb/files/patch-gdb-amd64fbsd-nat.c
new file mode 100644
index 000000000000..e2a759a084a5
--- /dev/null
+++ b/devel/gdb/files/patch-gdb-amd64fbsd-nat.c
@@ -0,0 +1,58 @@
+--- gdb/amd64fbsd-nat.c.orig 2010-10-13 14:53:14.425152000 -0400
++++ gdb/amd64fbsd-nat.c 2010-10-13 15:15:01.080198000 -0400
+@@ -27,6 +27,7 @@
+ #include <signal.h>
+ #include <stddef.h>
+ #include <sys/types.h>
++#include <sys/procfs.h>
+ #include <sys/ptrace.h>
+ #include <sys/sysctl.h>
+ #include <machine/reg.h>
+@@ -92,6 +93,47 @@
+ };
+
+
++/* Transfering the registers between GDB, inferiors and core files. */
++
++/* Fill GDB's register array with the general-purpose register values
++ in *GREGSETP. */
++
++void
++supply_gregset (struct regcache *regcache, const gregset_t *gregsetp)
++{
++ amd64_supply_native_gregset (regcache, gregsetp, -1);
++}
++
++/* Fill register REGNUM (if it is a general-purpose register) in
++ *GREGSETPS with the value in GDB's register array. If REGNUM is -1,
++ do this for all registers. */
++
++void
++fill_gregset (struct regcache *regcache, gregset_t *gregsetp, int regnum)
++{
++ amd64_collect_native_gregset (regcache, gregsetp, regnum);
++}
++
++/* Fill GDB's register array with the floating-point register values
++ in *FPREGSETP. */
++
++void
++supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
++{
++ amd64_supply_fxsave (regcache, -1, fpregsetp);
++}
++
++/* Fill register REGNUM (if it is a floating-point register) in
++ *FPREGSETP with the value in GDB's register array. If REGNUM is -1,
++ do this for all registers. */
++
++void
++fill_fpregset (struct regcache *regcache, fpregset_t *fpregsetp, int regnum)
++{
++ amd64_collect_fxsave (regcache, regnum, fpregsetp);
++}
++
++
+ /* Support for debugging kernel virtual memory images. */
+
+ #include <sys/types.h>