1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

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@
This commit is contained in:
David Schultz 2004-11-20 02:32:04 +00:00
parent 75b5bcbad6
commit 0ef5c36ff1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137921
3 changed files with 9 additions and 6 deletions

View File

@ -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),

View File

@ -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),

View File

@ -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),