Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 May 2003 15:14:57 -0700
From:      "David O'Brien" <obrien@freebsd.org>
To:        Ian Dowse <iedowse@maths.tcd.ie>
Cc:        current@freebsd.org
Subject:   Re: kgdb missing stack frames
Message-ID:  <20030518221457.GA4531@dragon.nuxi.com>
In-Reply-To: <200305182227.aa40061@salmon.maths.tcd.ie>
References:  <200305182227.aa40061@salmon.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, May 18, 2003 at 10:27:22PM +0100, Ian Dowse wrote:
> Index: contrib/gdb/gdb/config/i386/tm-fbsd.h
> ===================================================================
> RCS file: /dump/FreeBSD-CVS/src/contrib/gdb/gdb/config/i386/tm-fbsd.h,v
> retrieving revision 1.4
> diff -u -r1.4 tm-fbsd.h
> --- contrib/gdb/gdb/config/i386/tm-fbsd.h	12 Oct 2002 17:56:56 -0000	1.4
> +++ contrib/gdb/gdb/config/i386/tm-fbsd.h	18 May 2003 21:12:05 -0000

This would give vendor differences I was trying to avoid.  I think this
is another way to fix the problem.  I haven't tested it, but if you have
a chance before I do, want to give it a spin?


Index: Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/binutils/gdb/Makefile,v
retrieving revision 1.65
diff -u -r1.65 Makefile
--- Makefile	21 Mar 2003 00:30:53 -0000	1.65
+++ Makefile	18 May 2003 22:13:21 -0000
@@ -129,6 +129,7 @@
 nm.h:
 	echo '#include "${GDB_CPU}/nm-fbsd.h"'	>${.TARGET}
 	echo '#include "fbsd-kgdb.h"'		>>${.TARGET}
+	echo '#include "fbsd-kgdb-${TARGET_ARCH}.h"'	>>${.TARGET}
 
 .for H in tm-fbsd xm-${GDB_CPU}
 ${H:C/-.*$//}.h:
Index: fbsd-kgdb-i386.h
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/binutils/gdb/fbsd-kgdb-i386.h,v
retrieving revision 1.3
diff -u -r1.3 fbsd-kgdb-i386.h
--- fbsd-kgdb-i386.h	18 Sep 2002 16:20:49 -0000	1.3
+++ fbsd-kgdb-i386.h	18 May 2003 22:10:05 -0000
@@ -20,10 +20,8 @@
 #undef  FRAME_SAVED_PC
 #define FRAME_SAVED_PC(FRAME) \
   (kernel_debugging \
-    ? fbsd_kern_frame_saved_pc (FRAME) : \
-    (FRAME)->signal_handler_caller \
-      ? sigtramp_saved_pc (FRAME) \
-      : read_memory_integer ((FRAME)->frame + 4, 4))
+    ? fbsd_kern_frame_saved_pc (FRAME) \
+    : i386bsd_frame_saved_pc (FRAME))
 
 /* Offset to saved PC in sigcontext, from <sys/signal.h>.  */
 #define SIGCONTEXT_PC_OFFSET 20



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