aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/ptrace.h
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2005-06-30 07:49:22 +0000
committerPeter Wemm <peter@FreeBSD.org>2005-06-30 07:49:22 +0000
commit62919d788b37bba3390d9b9ed29ff5220d09840e (patch)
treedad118ce52d6d607680db2768f086c4ee826fd22 /sys/sys/ptrace.h
parentd14b395392bddcb1ea69d566a93f4cbbcac580b6 (diff)
downloadsrc-62919d788b37bba3390d9b9ed29ff5220d09840e.tar.gz
src-62919d788b37bba3390d9b9ed29ff5220d09840e.zip
Jumbo-commit to enhance 32 bit application support on 64 bit kernels.
This is good enough to be able to run a RELENG_4 gdb binary against a RELENG_4 application, along with various other tools (eg: 4.x gcore). We use this at work. ia32_reg.[ch]: handle the 32 bit register file format, used by ptrace, procfs and core dumps. procfs_*regs.c: vary the format of proc/XXX/*regs depending on the client and target application. procfs_map.c: Don't print a 64 bit value to 32 bit consumers, or their sscanf fails. They expect an unsigned long. imgact_elf.c: produce a valid 32 bit coredump for 32 bit apps. sys_process.c: handle 32 bit consumers debugging 32 bit targets. Note that 64 bit consumers can still debug 32 bit targets. IA64 has got stubs for ia32_reg.c. Known limitations: a 5.x/6.x gdb uses get/setcontext(), which isn't implemented in the 32/64 wrapper yet. We also make a tiny patch to gdb pacify it over conflicting formats of ld-elf.so.1. Approved by: re
Notes
Notes: svn path=/head/; revision=147692
Diffstat (limited to 'sys/sys/ptrace.h')
-rw-r--r--sys/sys/ptrace.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/sys/ptrace.h b/sys/sys/ptrace.h
index 0058683da9b0..93b1a7d6d0fc 100644
--- a/sys/sys/ptrace.h
+++ b/sys/sys/ptrace.h
@@ -135,6 +135,17 @@ int proc_read_dbregs(struct thread *_td, struct dbreg *_dbreg);
int proc_write_dbregs(struct thread *_td, struct dbreg *_dbreg);
int proc_sstep(struct thread *_td);
int proc_rwmem(struct proc *_p, struct uio *_uio);
+#ifdef COMPAT_IA32
+struct reg32;
+struct fpreg32;
+struct dbreg32;
+int proc_read_regs32(struct thread *_td, struct reg32 *_reg32);
+int proc_write_regs32(struct thread *_td, struct reg32 *_reg32);
+int proc_read_fpregs32(struct thread *_td, struct fpreg32 *_fpreg32);
+int proc_write_fpregs32(struct thread *_td, struct fpreg32 *_fpreg32);
+int proc_read_dbregs32(struct thread *_td, struct dbreg32 *_dbreg32);
+int proc_write_dbregs32(struct thread *_td, struct dbreg32 *_dbreg32);
+#endif
#else /* !_KERNEL */
#include <sys/cdefs.h>