[gnu.gdb.bug] problem with "where" command in gdb v3.1.2

amante@HUB.UCSB.EDU (06/17/89)

We recently moved to SunOS 4.0 on a Sun4/260.
Using gdb v3.1.2 to debug a g++-cross-compiler for a custom processor,
the debugger seems to "erroneously" assume that there is only one
frame. It does not report the outer frames which led to the kill().
(A script is shown below.)

The cross-compiler (the program being debugged) was compiled with
gcc v1.35. We checked it and found that it was statically linked
as required by gdb. "file" says that:
cc1plus:        sparc demand paged executable not stripped

I remember a posting for a similar problem before, but unfortunately
I discarded it. So any help on this problem will be greatly appreciated.
Thanks in advance... Amante


========================================================================
[shogun:/home/shogun/ra/amante/test]>!gd
gdb ../g++-VEC3/cc1plus core -d ../g++-VEC3
GDB 3.1.2, Copyright (C) 1988 Free Software Foundation, Inc.
There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details.
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "info copying" to see the conditions.
Reading symbol data from /home/shogun/ra/amante/test/../g++-VEC3/cc1plus...done.
Core file is from "cc1plus".
Program terminated with signal 6, Abort.
Type "help" for a list of commands.
(gdb) where
#0  0x10e5a0 in kill ()
(gdb) up
Initial frame selected; you cannot go up.
(gdb) do
Bottom (i.e., innermost) frame selected; you cannot go down.
(gdb) 

rfg@MCC.COM (Ron Guilmette) (06/17/89)

I have often seen the problem described by Amante with GDB.

A simple solution is to set a breakpoint on the library
function named "abort" before you start executing the program
being debugged.  Then, when you hit that breakpoint, the
"where" command should still work.  By the time you make it
into abort (or kill) however, the "where" command does in
fact give you only incomplete information.

// Ron Guilmette  -  MCC  -  Experimental Systems Kit Project
// 3500 West Balcones Center Drive,  Austin, TX  78759  -  (512)338-3740
// ARPA: rfg@mcc.com
// UUCP: {rutgers,uunet,gatech,ames,pyramid}!cs.utexas.edu!pp!rfg