Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Mar 1995 17:29:53 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        dave@prlng.co.uk, freebsd-bugs@freefall.cdrom.com
Subject:   Re: gnu/240: Fix for gdb to read stack from core dump
Message-ID:  <199503120729.RAA06963@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>Synopsis:       gdb does not correctly find the stack in a core dump

This should already be fixed in FreeBSD-current.

>--- /usr/src/gnu/usr.bin/gdb/bfd/sysdep.h       Thu Mar  2 21:14:02 1995
> ...
>! #if (defined(__bsdi__) | defined(__FreeBSD__))
>  /* This seems to be the right thing for BSDI.  */
>+ /* ..and also for FreeBSD, at least FreeBSD > 2. */
>  #define       HOST_STACK_END_ADDR             USRSTACK

Same fix in -current.

>--- /usr/src/gnu/usr.bin/gdb/bfd/trad-core.c    Thu Mar  2 22:11:17 1995
>...
>+ #ifndef __FreeBSD__
>  /* a hack, but it works for FreeBSD !! */
>+ /* Actually, it's not needed for FreeBSD 2.0, only for older versions. */
>  #include <vm/vm_param.h>
>  /* this should really be in <vm/vm_param.h>, but somebody forgot it */
>  #ifndef vm_page_size
>***************
>*** 200,205 ****
>--- 202,209 ----
>  #endif
>  #define HOST_STACK_START_ADDR trunc_page(u.u_kproc.kp_eproc.e_vm.vm_maxsaddr \
>  + MAXSSIZ - ctob(u.u_ssize))
>+ #endif
>+ 
>  #ifdef HOST_STACK_START_ADDR
>    core_stacksec (abfd)->vma = HOST_STACK_START_ADDR;
>  #else

Was apparently fixed by switching to gdb-4.13 and forgetting about the hack.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503120729.RAA06963>