diff options
author | das <das@FreeBSD.org> | 2004-11-20 02:32:04 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2004-11-20 02:32:04 +0000 |
commit | 8d8b5ace18d4442cbb949e9e1f48a0cfdb1d7c2e (patch) | |
tree | 2f9d83c630743799db13ebaae3fca79b14ffcf28 | |
parent | 02205f8827ecfd431c5893cab3129df47d56a1f3 (diff) | |
download | FreeBSD-src-8d8b5ace18d4442cbb949e9e1f48a0cfdb1d7c2e.zip FreeBSD-src-8d8b5ace18d4442cbb949e9e1f48a0cfdb1d7c2e.tar.gz |
Maintain the broken state of backwards compatibilty for a.out (and
PECOFF!) core dumps. None of the old versions of gdb I tried were
able to read a.out core dumps before or after this change.
Reviewed by: arch@
-rw-r--r-- | sys/compat/pecoff/imgact_pecoff.c | 5 | ||||
-rw-r--r-- | sys/i386/linux/linux_sysvec.c | 5 | ||||
-rw-r--r-- | sys/kern/imgact_aout.c | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/sys/compat/pecoff/imgact_pecoff.c b/sys/compat/pecoff/imgact_pecoff.c index 6a91b13..0efd794 100644 --- a/sys/compat/pecoff/imgact_pecoff.c +++ b/sys/compat/pecoff/imgact_pecoff.c @@ -79,6 +79,8 @@ __FBSDID("$FreeBSD$"); #include "opt_pecoff.h" +#define uarea_pages 1 + #define PECOFF_PE_SIGNATURE "PE\0\0" static int pecoff_fixup(register_t **, struct image_params *); static int @@ -189,9 +191,8 @@ pecoff_coredump(register struct thread * td, register struct vnode * vp, if (tempuser == NULL) return (ENOMEM); PROC_LOCK(p); - fill_kinfo_proc(p, &p->p_uarea->u_kproc); + fill_user(p, (struct user *)tempuser); PROC_UNLOCK(p); - bcopy(p->p_uarea, tempuser, sizeof(struct user)); bcopy(td->td_frame, tempuser + ctob(uarea_pages) + ((caddr_t)td->td_frame - (caddr_t)td->td_kstack), diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index bb7e338..8319c03 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -94,6 +94,8 @@ MALLOC_DEFINE(M_LINUX, "linux", "Linux mode structures"); #define LINUX_SYS_linux_rt_sendsig 0 #define LINUX_SYS_linux_sendsig 0 +#define uarea_pages 1 + extern char linux_sigcode[]; extern int linux_szsigcode; @@ -746,9 +748,8 @@ linux_aout_coredump(struct thread *td, struct vnode *vp, off_t limit) if (tempuser == NULL) return (ENOMEM); PROC_LOCK(p); - fill_kinfo_proc(p, &p->p_uarea->u_kproc); + fill_user(p, (struct user *)tempuser); PROC_UNLOCK(p); - bcopy(p->p_uarea, tempuser, sizeof(struct user)); bcopy(td->td_frame, tempuser + ctob(uarea_pages) + ((caddr_t)td->td_frame - (caddr_t)td->td_kstack), diff --git a/sys/kern/imgact_aout.c b/sys/kern/imgact_aout.c index 803f765..e2334a9 100644 --- a/sys/kern/imgact_aout.c +++ b/sys/kern/imgact_aout.c @@ -53,6 +53,8 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_object.h> #include <vm/vm_param.h> +#define uarea_pages 1 + static int exec_aout_imgact(struct image_params *imgp); static int aout_fixup(register_t **stack_base, struct image_params *imgp); @@ -284,9 +286,8 @@ aout_coredump(td, vp, limit) if (tempuser == NULL) return (ENOMEM); PROC_LOCK(p); - fill_kinfo_proc(p, &p->p_uarea->u_kproc); + fill_user(p, (struct user *)tempuser); PROC_UNLOCK(p); - bcopy(p->p_uarea, tempuser, sizeof(struct user)); bcopy(td->td_frame, tempuser + ctob(uarea_pages) + ((caddr_t)td->td_frame - (caddr_t)td->td_kstack), |