This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
gdb/406: GDB debugging sessions are continually crashing.
- From: dan dot hamden at opg dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 7 Mar 2002 20:55:32 -0000
- Subject: gdb/406: GDB debugging sessions are continually crashing.
- Reply-to: dan dot hamden at opg dot com
>Number: 406
>Category: gdb
>Synopsis: GDB debugging sessions are continually crashing.
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 07 12:58:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Dan Hamden
>Release: GDB version 5.0
>Organization:
>Environment:
Hardware: Compaq AlphaServer DS20E
O/S: Digital UNIX V4.0F (Rev. 1229)
>Description:
The following text is duplicated in the attachmented ascii text file. This has been done in an attempt to ensure that the information is readable and also because this web page appears to be rejecting my attachment.
My GDB debugging sessions are continually crashing on me. The problem occurs even when
stepping through a program that works. The specifics are as follows:
GDB version: 5.0
Hardware Platform: Compaq AlphaServer DS20E
O/S: Digital UNIX V4.0F (Rev. 1229)
Compiler used to build test program: Output from -v option:
Reading specs from /usr/bin/gcc_2.95.2/lib/gcc-lib/\
alphaev6-dec-osf4.0f/2.95.2/specs gcc version 2.92.2 19991024 (release)
Compiler used to build gdb: Two versions of gdb have been used: one version was
built from the source we obtained from the web, and
the other version was built by a third party. Both versions
were built with the C compiler delivered with the Digital UNIX V4.0F
operating system.
Makefile for test program: g++ -gstabs+ -c crash_test.cpp
g++ -o crash_test crash_test.o -lrt -lpthread -lXm -lXt \
-lSM -lICE -lX11 -ldnet_stub
Source file: crash_test.cpp (this file is attached below)
Problem description: GDB debugging sessions are continually crashing on me.
The problem occurs even when stepping through a program that works.
To reproduce the problem, do the following:
(1) Build the attached program (crash_test.cpp) as
specified above:
(2) Use gdb to step through the test program, using the following
gdb commands:
b main
r
n
n
etc
Even though the program works correctly, gdb crashes
with either of the following messages:
Program received signal SIGSEGV, Segmentation fault.
-- or --
Program received signal SIGSEGV, Segmentation fault.
warning: Hit heuristic-fence-post without finding
warning: enclosing function for address
0x80184830000003fe
This warning occurs if you are debugging a function
without any symbols
(for example, in a stripped executable). In that
case, you may wish to increase the size of the search
with the `set heuristic-fence-post' command.
Otherwise, you told GDB there was a function where
there isn't one, or (more likely) you have
encountered a bug in GDB.
-- or --
Program received signal SIGTRAP, Trace/breakpoint
trap.
(3) As stated in step 2 above, I do not always get the
same error message. The rate at which you step
through the program, also seems to affect the error
message.
Attachment 1: Crash_test.cpp
/***************** Header Files ******************/
#include <unistd.h>
#include <Xm/Xm.h>
#include <Xm/DrawingA.h>
#include <iostream>
/********* Defines *************************/
/***************** Global variables ******************/
XtAppContext app; /* .. Application context .. */
char *pszServer = ":0.0";
Widget wShell;
Widget wDrawArea;
Display *display;
/*_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ _/
_/ Subroutines _/
_/ _/
_/_/_/_/_/_/_/_/_/_/_/_/_/*/
void CreateWindow( void )
{
int argc = 1; /* .. Dummy command line argc .. */
char *argv[1] = {""}; /* .. Dummy command line argv .. */
if ( (display = XtOpenDisplay( app, pszServer, "sds", "Sds", NULL, 0,
&argc, argv)) != NULL )
{
wShell = XtVaAppCreateShell(
NULL, NULL, applicationShellWidgetClass, display,
XmNmaxWidth, 320,
XmNmaxHeight, 240,
NULL );
wDrawArea = XtVaCreateWidget( " ", xmDrawingAreaWidgetClass,
wShell,
XmNwidth, 320,
XmNheight, 240,
NULL );
XtManageChild( wDrawArea );
XtRealizeWidget( wShell );
}
else
{
cout << "Unable to establish a connection to " << pszServer <<endl;
}
}
/*_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ _/
_/ Main Line _/
_/ _/
_/_/_/_/_/_/_/_/_/_/_/_/_/*/
main( int argc, char *argv[] )
{
Widget wToplevel;
XInitThreads();
XtToolkitThreadInitialize();
XtSetLanguageProc( NULL, NULL, NULL );
wToplevel = XtVaAppInitialize( &app, "SDS", NULL, 0, &argc, argv, NULL,
XmNmappedWhenManaged, FALSE,
XmNwidth, 500,
XmNtitle, "SDS / Ramtek 6210 Series Emulator: Dan Hamden",
NULL );
CreateWindow();
XtAppMainLoop( app );
}
Attachment 2: Library Contents
Below is a list of the library contents of the libraries that I have specified in my Makefile.
This listing was produced via the unix "what" command.
librt.so:
$RCSfile: psx4_timers.c,v $ $Revision: 4.2.18.3 $ (DEC) $Date: 1997/03/06 17:04:03 $
$RCSfile: psx4_ipc.c,v $ $Revision: 1.1.20.3 $ (DEC) $Date: 1997/09/12 16:04:37 $
$RCSfile: psx4_sig.c,v $ $Revision: 1.1.7.2 $ (DEC) $Date: 1996/12/03 21:50:19 $
$RCSfile: psx4_exc.c,v $ $Revision: 1.1.2.3 $ (DEC) $Date: 1997/07/02 13:41:17 $
$RCSfile: psx4_sigev.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1996/12/03 21:50:20 $
$RCSfile: p4ipc.s,v $ $Revision: 1.1.6.2 $ (DEC) $Date: 1994/12/22 13:00:58 $
$RCSfile: rtsig.s,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 18:01:45 $
$RCSfile: schsetp.c,v $ $Revision: 4.2.4.2 $ (DEC) $Date: 1992/03/19 17:10:56 $
$RCSfile: schgetp.c,v $ $Revision: 4.2.6.2 $ (DEC) $Date: 1995/04/28 19:25:07 $
$RCSfile: schsetsch.c,v $ $Revision: 4.2.4.2 $ (DEC) $Date: 1992/03/19 17:13:16 $
$RCSfile: schgetsch.c,v $ $Revision: 4.2.5.2 $ (DEC) $Date: 1995/06/28 22:08:05 $
habitat_id = realtime_12:1991
$RCSfile: psx4_shm.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1995/04/28 19:24:59 $
$RCSfile: psx4_nspace_ts.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1998/04/08 19:28:30 $
$RCSfile: psx4_csem.c,v $ $Revision: 1.1.23.3 $ (DEC) $Date: 1998/05/08 16:01:07 $
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
$RCSfile: schgetmax.c,v $ $Revision: 1.1.6.2 $ (DEC) $Date: 1996/12/18 20:39:05 $
$RCSfile: schgetmin.c,v $ $Revision: 1.1.6.2 $ (DEC) $Date: 1996/12/18 20:39:07 $
$RCSfile: schgetrr.c,v $ $Revision: 1.1.6.2 $ (DEC) $Date: 1995/04/28 19:24:19 $
$RCSfile: csem_sleep_wake.s,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1993/09/23 18:37:59 $
$RCSfile: csem_atomic.s,v $ $Revision: 1.1.2.3 $ (DEC) $Date: 1994/02/16 19:42:43 $
libpthread.so:
$RCSfile: thd_cancel.c,v $ $Revision: 1.1.11.2 $ (DEC) $Date: 1998/10/02 21:43:11 $
$RCSfile: thd_cond.c,v $ $Revision: 1.1.75.3 $ (DEC) $Date: 1999/07/22 15:43:00 $
$RCSfile: thd_config.c,v $ $Revision: 1.1.51.3 $ (DEC) $Date: 1999/07/22 15:43:01 $
$RCSfile: thd_deb_core.c,v $ $Revision: 1.1.50.3 $ (DEC) $Date: 1999/07/22 15:43:03 $
$RCSfile: thd_deb_event.c,v $ $Revision: 1.1.12.3 $ (DEC) $Date: 1999/02/17 18:46:28 $
$RCSfile: thd_debug_strs.c,v $ $Revision: 1.1.14.4 $ (DEC) $Date: 1999/02/11 21:04:47 $
$RCSfile: thd_dispatch.c,v $ $Revision: 1.1.69.3 $ (DEC) $Date: 1999/07/22 15:43:14 $
$RCSfile: thd_errors.c,v $ $Revision: 1.1.59.2 $ (DEC) $Date: 1999/07/22 15:43:18 $
$RCSfile: thd_exception.c,v $ $Revision: 1.1.23.2 $ (DEC) $Date: 1998/10/02 21:45:10 $
$RCSfile: thd_exception_os.c,v $ $Revision: 1.1.31.3 $ (DEC) $Date: 1999/07/22 15:43:40 $
$RCSfile: thd_host.c,v $ $Revision: 1.1.59.2 $ (DEC) $Date: 1999/04/30 14:46:27 $
DECthreads version V3.15-421 Nov 1 1999
$RCSfile: thd_init.c,v $ $Revision: 1.1.61.3 $ (DEC) $Date: 1999/07/22 15:43:19 $
$RCSfile: thd_kernel.c,v $ $Revision: 1.1.50.2 $ (DEC) $Date: 1999/04/30 14:45:30 $
$RCSfile: thd_message.c,v $ $Revision: 1.1.10.2 $ (DEC) $Date: 1998/10/02 21:47:46 $
$RCSfile: thd_mutex.c,v $ $Revision: 1.1.87.3 $ (DEC) $Date: 1999/07/22 15:43:20 $
$RCSfile: thd_os.c,v $ $Revision: 1.1.30.2 $ (DEC) $Date: 1999/07/22 15:43:43 $
$RCSfile: thd_paddock.c,v $ $Revision: 1.1.6.2 $ (DEC) $Date: 1998/10/02 21:45:44 $
$RCSfile: thd_put.c,v $ $Revision: 1.1.52.2 $ (DEC) $Date: 1999/07/22 15:43:23 $
$RCSfile: thd_rwlock.c,v $ $Revision: 1.1.41.2 $ (DEC) $Date: 1999/07/22 15:43:28 $
$RCSfile: thd_sched.c,v $ $Revision: 1.1.70.3 $ (DEC) $Date: 1999/07/22 15:43:29 $
$RCSfile: thd_scs.c,v $ $Revision: 1.1.47.2 $ (DEC) $Date: 1999/04/30 14:46:33 $
$RCSfile: thd_signal.c,v $ $Revision: 1.1.81.2 $ (DEC) $Date: 1999/04/30 14:46:36 $
$RCSfile: thd_stack.c,v $ $Revision: 1.1.19.3 $ (DEC) $Date: 1998/12/03 20:36:46 $
$RCSfile: thd_thread.c,v $ $Revision: 1.1.84.3 $ (DEC) $Date: 1999/07/22 15:43:31 $
$RCSfile: thd_timer.c,v $ $Revision: 1.1.12.5 $ (DEC) $Date: 1999/02/17 18:46:45 $
$RCSfile: thd_tis_sup.c,v $ $Revision: 1.1.44.2 $ (DEC) $Date: 1999/07/22 15:43:34 $
$RCSfile: thd_trace.c,v $ $Revision: 1.1.57.3 $ (DEC) $Date: 1999/07/22 15:43:35 $
$RCSfile: thd_trace_log.c,v $ $Revision: 1.1.44.3 $ (DEC) $Date: 1999/07/22 15:43:36 $
$RCSfile: thd_tsd.c,v $ $Revision: 1.1.48.2 $ (DEC) $Date: 1999/07/22 15:43:38 $
$RCSfile: thd_upcalls.c,v $ $Revision: 1.1.59.3 $ (DEC) $Date: 1999/07/22 15:43:44 $
$RCSfile: thd_util.c,v $ $Revision: 1.1.13.4 $ (DEC) $Date: 1999/02/11 21:05:05 $
$RCSfile: thd_ux.c,v $ $Revision: 1.1.45.3 $ (DEC) $Date: 1999/07/22 15:43:44 $
$RCSfile: thd_vm.c,v $ $Revision: 1.1.19.3 $ (DEC) $Date: 1998/12/03 20:37:05 $
$RCSfile: thd_vp.c,v $ $Revision: 1.1.79.3 $ (DEC) $Date: 1999/07/22 15:43:45 $
$RCSfile: thd_assem.s,v $ $Revision: 1.1.34.6 $ (DEC) $Date: 1999/02/11 21:05:07 $
habitat_id = realtime_12:1991
libXm.so:
$RCSfile: DtHash.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:11:50 $
$RCSfile: XpmCrDataFI.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:32:45 $
$RCSfile: XpmCrDataFP.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:32:50 $
$RCSfile: XpmCrIFData.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:32:54 $
$RCSfile: XpmData.c,v $ $Revision: 1.1.6.4 $ (DEC) $Date: 1995/11/16 15:13:02 $
$RCSfile: XpmHashtable.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:33:08 $
$RCSfile: XpmMisc.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:33:11 $
$RCSfile: XpmScan.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:33:27 $
$RCSfile: DropSMgr.c,v $ $Revision: 1.1.28.2 $ (DEC) $Date: 1999/04/30 20:41:46 $
$RCSfile: ToggleB.c,v $ $Revision: 1.1.33.1 $ (DEC) $Date: 1999/10/06 16:54:29 $
$RCSfile: XmIm.c,v $ $Revision: 1.1.25.2 $ (DEC) $Date: 1998/06/15 19:37:27 $
$RCSfile: Display.c,v $ $Revision: 1.1.21.1 $ (DEC) $Date: 1999/10/06 16:54:25 $
OSF/Motif Version 1.2.4
libXt.so:
$RCSfile: Convert.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1999/05/13 19:41:34 $
$RCSfile: Converters.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1999/05/13 19:41:37 $
$RCSfile: Display.c,v $ $Revision: 1.1.3.3 $ (DEC) $Date: 1995/07/17 22:17:50 $
$RCSfile: Error.c,v $ $Revision: 1.1.6.3 $ (DEC) $Date: 1997/12/02 19:27:59 $
$RCSfile: Geometry.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1999/05/13 19:41:39 $
$RCSfile: Initialize.c,v $ $Revision: 1.1.17.3 $ (DEC) $Date: 1998/10/26 21:38:55 $
$RCSfile: Intrinsic.c,v $ $Revision: 1.1.19.2 $ (DEC) $Date: 1999/05/13 19:41:40 $
$RCSfile: PassivGrab.c,v $ $Revision: 1.1.16.2 $ (DEC) $Date: 1999/05/13 19:41:43 $
$RCSfile: Resources.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1999/05/13 19:41:45 $
$RCSfile: Shell.c,v $ $Revision: 1.1.8.2 $ (DEC) $Date: 1997/09/29 18:14:41 $
$RCSfile: TMaction.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 21:38:59 $
$RCSfile: TMgrab.c,v $ $Revision: 1.1.8.1 $ (DEC) $Date: 1999/12/01 15:38:06 $
$RCSfile: TMparse.c,v $ $Revision: 1.1.19.2 $ (DEC) $Date: 1999/05/13 19:41:47 $
$RCSfile: VarGet.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1999/05/13 19:41:48 $
$RCSfile: Varargs.c,v $ $Revision: 1.1.15.2 $ (DEC) $Date: 1999/05/13 19:41:49 $
$RCSfile: EditresCom.c,v $ $Revision: 1.1.7.2 $ (DEC) $Date: 1998/10/26 21:38:50 $
$RCSfile: StringConverters.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1995/01/25 22:13:17 $
$RCSfile: I18N.c,v $ $Revision: 1.1.10.2 $ (DEC) $Date: 1998/03/27 18:05:18 $
$RCSfile: I18N_EN.c,v $ $Revision: 1.1.5.3 $ (DEC) $Date: 1996/02/08 01:41:24 $
$RCSfile: Getdechints.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/10/03 20:38:21 $
$RCSfile: Setdechints.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/10/03 20:38:47 $
libSM.so:
libICE.so:
$RCSfile: connect.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 16:21:22 $
$RCSfile: Xtransdnet.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1997/04/25 13:44:23 $
$RCSfile: Xtranssock.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1998/06/15 16:49:09 $
$RCSfile: Xtrans.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 21:39:04 $
$RCSfile: dnet_stub.c,v $ $Revision: 1.1.4.2 $ (DEC) $Date: 1993/11/02 15:28:09 $
libX11.so:
$RCSfile: ConnDis.c,v $ $Revision: 1.1.10.2 $ (DEC) $Date: 1997/09/29 18:14:10 $
$RCSfile: ErrDes.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 19:08:30 $
$RCSfile: GetDflt.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1998/10/26 19:08:34 $
$RCSfile: GetPntMap.c,v $ $Revision: 1.1.7.2 $ (DEC) $Date: 1998/10/26 19:08:36 $
$RCSfile: KeysymStr.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1997/09/29 18:14:18 $
$RCSfile: OpenDis.c,v $ $Revision: 1.1.7.3 $ (DEC) $Date: 1995/12/19 19:56:47 $
$RCSfile: Xrm.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/03/12 21:21:05 $
$RCSfile: AuDispose.c,v $ $Revision: 1.1.3.2 $ (DEC) $Date: 1995/09/06 20:11:48 $
$RCSfile: AuFileName.c,v $ $Revision: 1.1.3.2 $ (DEC) $Date: 1995/09/06 20:11:45 $
$RCSfile: AuRead.c,v $ $Revision: 1.1.3.2 $ (DEC) $Date: 1995/09/06 20:11:49 $
$RCSfile: k5encode.c,v $ $Revision: 1.1.4.2 $ (DEC) $Date: 1995/08/10 20:13:00 $
$RCSfile: krb5_stub.c,v $ $Revision: 1.1.3.2 $ (DEC) $Date: 1995/08/10 20:13:04 $
$RCSfile: FSWrap.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 19:08:32 $
$RCSfile: lcWrap.c,v $ $Revision: 1.1.7.2 $ (DEC) $Date: 1998/10/26 19:08:50 $
$RCSfile: Xtransdnet.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1997/04/25 13:44:23 $
$RCSfile: Xtranssock.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1998/06/15 16:49:09 $
$RCSfile: Xtrans.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 21:39:04 $
$RCSfile: Xtransdnet.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1997/04/25 13:44:23 $
$RCSfile: Xtranssock.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1998/06/15 16:49:09 $
$RCSfile: Xtrans.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 21:39:04 $
$RCSfile: XKBCvt.c,v $ $Revision: 1.1.19.1 $ (DEC) $Date: 1999/09/22 18:22:42 $
$RCSfile: XKBGetMap.c,v $ $Revision: 1.1.11.2 $ (DEC) $Date: 1998/10/26 19:08:41 $
$RCSfile: SetLocale.c,v $ $Revision: 1.1.9.2 $ (DEC) $Date: 1998/10/26 19:08:37 $
$RCSfile: imInt.c,v $ $Revision: 1.1.9.2 $ (DEC) $Date: 1998/10/26 19:08:43 $
$RCSfile: imRm.c,v $ $Revision: 1.1.7.2 $ (DEC) $Date: 1998/10/26 19:08:45 $
$RCSfile: lcDB.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1997/09/29 18:14:25 $
$RCSfile: lcFile.c,v $ $Revision: 1.1.8.2 $ (DEC) $Date: 1999/02/03 19:33:15 $
$RCSfile: lcPublic.c,v $ $Revision: 1.1.9.2 $ (DEC) $Date: 1998/10/26 19:08:48 $
$RCSfile: lcRM.c,v $ $Revision: 1.1.4.2 $ (DEC) $Date: 1995/09/25 20:21:32 $
$RCSfile: lcUTF.c,v $ $Revision: 1.1.6.2 $ (DEC) $Date: 1997/09/29 18:14:31 $
$RCSfile: Compose.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1995/05/09 20:37:19 $
$RCSfile: dechack.c,v $ $Revision: 1.1.2.6 $ (DEC) $Date: 1995/05/16 19:35:56 $
$RCSfile: lcDECConv.c,v $ $Revision: 1.1.2.4 $ (DEC) $Date: 1995/05/26 21:25:39 $
$RCSfile: dnet_stub.c,v $ $Revision: 1.1.4.2 $ (DEC) $Date: 1993/11/02 15:28:09 $
libdnet_stub.so:
$RCSfile: dnet_stub.c,v $ $Revision: 1.1.4.2 $ (DEC) $Date: 1993/11/02 15:28:09 $
March 7, 2002
Page 8
>How-To-Repeat:
This is described in both the description above and the attached file.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="GDB-bug-LB.txt"
Content-Disposition: inline; filename="GDB-bug-LB.txt"
My GDB debugging sessions are continually crashing on me. The problem occurs even when
stepping through a program that works. The specifics are as follows:
GDB version: 5.0
Hardware Platform: Compaq AlphaServer DS20E
O/S: Digital UNIX V4.0F (Rev. 1229)
Compiler used to build test program: Output from -v option:
Reading specs from /usr/bin/gcc_2.95.2/lib/gcc-lib/\
alphaev6-dec-osf4.0f/2.95.2/specs gcc version 2.92.2 19991024 (release)
Compiler used to build gdb: Two versions of gdb have been used: one version was
built from the source we obtained from the web, and
the other version was built by a third party. Both versions
were built with the C compiler delivered with the Digital UNIX V4.0F
operating system.
Makefile for test program: g++ -gstabs+ -c crash_test.cpp
g++ -o crash_test crash_test.o -lrt -lpthread -lXm -lXt \
-lSM -lICE -lX11 -ldnet_stub
Source file: crash_test.cpp (this file is attached below)
Problem description: GDB debugging sessions are continually crashing on me.
The problem occurs even when stepping through a program that works.
To reproduce the problem, do the following:
(1) Build the attached program (crash_test.cpp) as
specified above:
(2) Use gdb to step through the test program, using the following
gdb commands:
b main
r
n
n
etc
Even though the program works correctly, gdb crashes
with either of the following messages:
Program received signal SIGSEGV, Segmentation fault.
-- or --
Program received signal SIGSEGV, Segmentation fault.
warning: Hit heuristic-fence-post without finding
warning: enclosing function for address
0x80184830000003fe
This warning occurs if you are debugging a function
without any symbols
(for example, in a stripped executable). In that
case, you may wish to increase the size of the search
with the `set heuristic-fence-post' command.
Otherwise, you told GDB there was a function where
there isn't one, or (more likely) you have
encountered a bug in GDB.
-- or --
Program received signal SIGTRAP, Trace/breakpoint
trap.
(3) As stated in step 2 above, I do not always get the
same error message. The rate at which you step
through the program, also seems to affect the error
message.
Attachment 1: Crash_test.cpp
/***************** Header Files ******************/
#include <unistd.h>
#include <Xm/Xm.h>
#include <Xm/DrawingA.h>
#include <iostream>
/********* Defines *************************/
/***************** Global variables ******************/
XtAppContext app; /* .. Application context .. */
char *pszServer = ":0.0";
Widget wShell;
Widget wDrawArea;
Display *display;
/*_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ _/
_/ Subroutines _/
_/ _/
_/_/_/_/_/_/_/_/_/_/_/_/_/*/
void CreateWindow( void )
{
int argc = 1; /* .. Dummy command line argc .. */
char *argv[1] = {""}; /* .. Dummy command line argv .. */
if ( (display = XtOpenDisplay( app, pszServer, "sds", "Sds", NULL, 0,
&argc, argv)) != NULL )
{
wShell = XtVaAppCreateShell(
NULL, NULL, applicationShellWidgetClass, display,
XmNmaxWidth, 320,
XmNmaxHeight, 240,
NULL );
wDrawArea = XtVaCreateWidget( " ", xmDrawingAreaWidgetClass,
wShell,
XmNwidth, 320,
XmNheight, 240,
NULL );
XtManageChild( wDrawArea );
XtRealizeWidget( wShell );
}
else
{
cout << "Unable to establish a connection to " << pszServer <<endl;
}
}
/*_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ _/
_/ Main Line _/
_/ _/
_/_/_/_/_/_/_/_/_/_/_/_/_/*/
main( int argc, char *argv[] )
{
Widget wToplevel;
XInitThreads();
XtToolkitThreadInitialize();
XtSetLanguageProc( NULL, NULL, NULL );
wToplevel = XtVaAppInitialize( &app, "SDS", NULL, 0, &argc, argv, NULL,
XmNmappedWhenManaged, FALSE,
XmNwidth, 500,
XmNtitle, "SDS / Ramtek 6210 Series Emulator: Dan Hamden",
NULL );
CreateWindow();
XtAppMainLoop( app );
}
Attachment 2: Library Contents
Below is a list of the library contents of the libraries that I have specified in my Makefile.
This listing was produced via the unix "what" command.
librt.so:
$RCSfile: psx4_timers.c,v $ $Revision: 4.2.18.3 $ (DEC) $Date: 1997/03/06 17:04:03 $
$RCSfile: psx4_ipc.c,v $ $Revision: 1.1.20.3 $ (DEC) $Date: 1997/09/12 16:04:37 $
$RCSfile: psx4_sig.c,v $ $Revision: 1.1.7.2 $ (DEC) $Date: 1996/12/03 21:50:19 $
$RCSfile: psx4_exc.c,v $ $Revision: 1.1.2.3 $ (DEC) $Date: 1997/07/02 13:41:17 $
$RCSfile: psx4_sigev.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1996/12/03 21:50:20 $
$RCSfile: p4ipc.s,v $ $Revision: 1.1.6.2 $ (DEC) $Date: 1994/12/22 13:00:58 $
$RCSfile: rtsig.s,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 18:01:45 $
$RCSfile: schsetp.c,v $ $Revision: 4.2.4.2 $ (DEC) $Date: 1992/03/19 17:10:56 $
$RCSfile: schgetp.c,v $ $Revision: 4.2.6.2 $ (DEC) $Date: 1995/04/28 19:25:07 $
$RCSfile: schsetsch.c,v $ $Revision: 4.2.4.2 $ (DEC) $Date: 1992/03/19 17:13:16 $
$RCSfile: schgetsch.c,v $ $Revision: 4.2.5.2 $ (DEC) $Date: 1995/06/28 22:08:05 $
habitat_id = realtime_12:1991
$RCSfile: psx4_shm.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1995/04/28 19:24:59 $
$RCSfile: psx4_nspace_ts.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1998/04/08 19:28:30 $
$RCSfile: psx4_csem.c,v $ $Revision: 1.1.23.3 $ (DEC) $Date: 1998/05/08 16:01:07 $
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
habitat_id = realtime_12:1991
$RCSfile: schgetmax.c,v $ $Revision: 1.1.6.2 $ (DEC) $Date: 1996/12/18 20:39:05 $
$RCSfile: schgetmin.c,v $ $Revision: 1.1.6.2 $ (DEC) $Date: 1996/12/18 20:39:07 $
$RCSfile: schgetrr.c,v $ $Revision: 1.1.6.2 $ (DEC) $Date: 1995/04/28 19:24:19 $
$RCSfile: csem_sleep_wake.s,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1993/09/23 18:37:59 $
$RCSfile: csem_atomic.s,v $ $Revision: 1.1.2.3 $ (DEC) $Date: 1994/02/16 19:42:43 $
libpthread.so:
$RCSfile: thd_cancel.c,v $ $Revision: 1.1.11.2 $ (DEC) $Date: 1998/10/02 21:43:11 $
$RCSfile: thd_cond.c,v $ $Revision: 1.1.75.3 $ (DEC) $Date: 1999/07/22 15:43:00 $
$RCSfile: thd_config.c,v $ $Revision: 1.1.51.3 $ (DEC) $Date: 1999/07/22 15:43:01 $
$RCSfile: thd_deb_core.c,v $ $Revision: 1.1.50.3 $ (DEC) $Date: 1999/07/22 15:43:03 $
$RCSfile: thd_deb_event.c,v $ $Revision: 1.1.12.3 $ (DEC) $Date: 1999/02/17 18:46:28 $
$RCSfile: thd_debug_strs.c,v $ $Revision: 1.1.14.4 $ (DEC) $Date: 1999/02/11 21:04:47 $
$RCSfile: thd_dispatch.c,v $ $Revision: 1.1.69.3 $ (DEC) $Date: 1999/07/22 15:43:14 $
$RCSfile: thd_errors.c,v $ $Revision: 1.1.59.2 $ (DEC) $Date: 1999/07/22 15:43:18 $
$RCSfile: thd_exception.c,v $ $Revision: 1.1.23.2 $ (DEC) $Date: 1998/10/02 21:45:10 $
$RCSfile: thd_exception_os.c,v $ $Revision: 1.1.31.3 $ (DEC) $Date: 1999/07/22 15:43:40 $
$RCSfile: thd_host.c,v $ $Revision: 1.1.59.2 $ (DEC) $Date: 1999/04/30 14:46:27 $
DECthreads version V3.15-421 Nov 1 1999
$RCSfile: thd_init.c,v $ $Revision: 1.1.61.3 $ (DEC) $Date: 1999/07/22 15:43:19 $
$RCSfile: thd_kernel.c,v $ $Revision: 1.1.50.2 $ (DEC) $Date: 1999/04/30 14:45:30 $
$RCSfile: thd_message.c,v $ $Revision: 1.1.10.2 $ (DEC) $Date: 1998/10/02 21:47:46 $
$RCSfile: thd_mutex.c,v $ $Revision: 1.1.87.3 $ (DEC) $Date: 1999/07/22 15:43:20 $
$RCSfile: thd_os.c,v $ $Revision: 1.1.30.2 $ (DEC) $Date: 1999/07/22 15:43:43 $
$RCSfile: thd_paddock.c,v $ $Revision: 1.1.6.2 $ (DEC) $Date: 1998/10/02 21:45:44 $
$RCSfile: thd_put.c,v $ $Revision: 1.1.52.2 $ (DEC) $Date: 1999/07/22 15:43:23 $
$RCSfile: thd_rwlock.c,v $ $Revision: 1.1.41.2 $ (DEC) $Date: 1999/07/22 15:43:28 $
$RCSfile: thd_sched.c,v $ $Revision: 1.1.70.3 $ (DEC) $Date: 1999/07/22 15:43:29 $
$RCSfile: thd_scs.c,v $ $Revision: 1.1.47.2 $ (DEC) $Date: 1999/04/30 14:46:33 $
$RCSfile: thd_signal.c,v $ $Revision: 1.1.81.2 $ (DEC) $Date: 1999/04/30 14:46:36 $
$RCSfile: thd_stack.c,v $ $Revision: 1.1.19.3 $ (DEC) $Date: 1998/12/03 20:36:46 $
$RCSfile: thd_thread.c,v $ $Revision: 1.1.84.3 $ (DEC) $Date: 1999/07/22 15:43:31 $
$RCSfile: thd_timer.c,v $ $Revision: 1.1.12.5 $ (DEC) $Date: 1999/02/17 18:46:45 $
$RCSfile: thd_tis_sup.c,v $ $Revision: 1.1.44.2 $ (DEC) $Date: 1999/07/22 15:43:34 $
$RCSfile: thd_trace.c,v $ $Revision: 1.1.57.3 $ (DEC) $Date: 1999/07/22 15:43:35 $
$RCSfile: thd_trace_log.c,v $ $Revision: 1.1.44.3 $ (DEC) $Date: 1999/07/22 15:43:36 $
$RCSfile: thd_tsd.c,v $ $Revision: 1.1.48.2 $ (DEC) $Date: 1999/07/22 15:43:38 $
$RCSfile: thd_upcalls.c,v $ $Revision: 1.1.59.3 $ (DEC) $Date: 1999/07/22 15:43:44 $
$RCSfile: thd_util.c,v $ $Revision: 1.1.13.4 $ (DEC) $Date: 1999/02/11 21:05:05 $
$RCSfile: thd_ux.c,v $ $Revision: 1.1.45.3 $ (DEC) $Date: 1999/07/22 15:43:44 $
$RCSfile: thd_vm.c,v $ $Revision: 1.1.19.3 $ (DEC) $Date: 1998/12/03 20:37:05 $
$RCSfile: thd_vp.c,v $ $Revision: 1.1.79.3 $ (DEC) $Date: 1999/07/22 15:43:45 $
$RCSfile: thd_assem.s,v $ $Revision: 1.1.34.6 $ (DEC) $Date: 1999/02/11 21:05:07 $
habitat_id = realtime_12:1991
libXm.so:
$RCSfile: DtHash.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:11:50 $
$RCSfile: XpmCrDataFI.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:32:45 $
$RCSfile: XpmCrDataFP.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:32:50 $
$RCSfile: XpmCrIFData.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:32:54 $
$RCSfile: XpmData.c,v $ $Revision: 1.1.6.4 $ (DEC) $Date: 1995/11/16 15:13:02 $
$RCSfile: XpmHashtable.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:33:08 $
$RCSfile: XpmMisc.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:33:11 $
$RCSfile: XpmScan.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/09/09 21:33:27 $
$RCSfile: DropSMgr.c,v $ $Revision: 1.1.28.2 $ (DEC) $Date: 1999/04/30 20:41:46 $
$RCSfile: ToggleB.c,v $ $Revision: 1.1.33.1 $ (DEC) $Date: 1999/10/06 16:54:29 $
$RCSfile: XmIm.c,v $ $Revision: 1.1.25.2 $ (DEC) $Date: 1998/06/15 19:37:27 $
$RCSfile: Display.c,v $ $Revision: 1.1.21.1 $ (DEC) $Date: 1999/10/06 16:54:25 $
OSF/Motif Version 1.2.4
libXt.so:
$RCSfile: Convert.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1999/05/13 19:41:34 $
$RCSfile: Converters.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1999/05/13 19:41:37 $
$RCSfile: Display.c,v $ $Revision: 1.1.3.3 $ (DEC) $Date: 1995/07/17 22:17:50 $
$RCSfile: Error.c,v $ $Revision: 1.1.6.3 $ (DEC) $Date: 1997/12/02 19:27:59 $
$RCSfile: Geometry.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1999/05/13 19:41:39 $
$RCSfile: Initialize.c,v $ $Revision: 1.1.17.3 $ (DEC) $Date: 1998/10/26 21:38:55 $
$RCSfile: Intrinsic.c,v $ $Revision: 1.1.19.2 $ (DEC) $Date: 1999/05/13 19:41:40 $
$RCSfile: PassivGrab.c,v $ $Revision: 1.1.16.2 $ (DEC) $Date: 1999/05/13 19:41:43 $
$RCSfile: Resources.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1999/05/13 19:41:45 $
$RCSfile: Shell.c,v $ $Revision: 1.1.8.2 $ (DEC) $Date: 1997/09/29 18:14:41 $
$RCSfile: TMaction.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 21:38:59 $
$RCSfile: TMgrab.c,v $ $Revision: 1.1.8.1 $ (DEC) $Date: 1999/12/01 15:38:06 $
$RCSfile: TMparse.c,v $ $Revision: 1.1.19.2 $ (DEC) $Date: 1999/05/13 19:41:47 $
$RCSfile: VarGet.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1999/05/13 19:41:48 $
$RCSfile: Varargs.c,v $ $Revision: 1.1.15.2 $ (DEC) $Date: 1999/05/13 19:41:49 $
$RCSfile: EditresCom.c,v $ $Revision: 1.1.7.2 $ (DEC) $Date: 1998/10/26 21:38:50 $
$RCSfile: StringConverters.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1995/01/25 22:13:17 $
$RCSfile: I18N.c,v $ $Revision: 1.1.10.2 $ (DEC) $Date: 1998/03/27 18:05:18 $
$RCSfile: I18N_EN.c,v $ $Revision: 1.1.5.3 $ (DEC) $Date: 1996/02/08 01:41:24 $
$RCSfile: Getdechints.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/10/03 20:38:21 $
$RCSfile: Setdechints.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1994/10/03 20:38:47 $
libSM.so:
libICE.so:
$RCSfile: connect.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 16:21:22 $
$RCSfile: Xtransdnet.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1997/04/25 13:44:23 $
$RCSfile: Xtranssock.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1998/06/15 16:49:09 $
$RCSfile: Xtrans.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 21:39:04 $
$RCSfile: dnet_stub.c,v $ $Revision: 1.1.4.2 $ (DEC) $Date: 1993/11/02 15:28:09 $
libX11.so:
$RCSfile: ConnDis.c,v $ $Revision: 1.1.10.2 $ (DEC) $Date: 1997/09/29 18:14:10 $
$RCSfile: ErrDes.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 19:08:30 $
$RCSfile: GetDflt.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1998/10/26 19:08:34 $
$RCSfile: GetPntMap.c,v $ $Revision: 1.1.7.2 $ (DEC) $Date: 1998/10/26 19:08:36 $
$RCSfile: KeysymStr.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1997/09/29 18:14:18 $
$RCSfile: OpenDis.c,v $ $Revision: 1.1.7.3 $ (DEC) $Date: 1995/12/19 19:56:47 $
$RCSfile: Xrm.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/03/12 21:21:05 $
$RCSfile: AuDispose.c,v $ $Revision: 1.1.3.2 $ (DEC) $Date: 1995/09/06 20:11:48 $
$RCSfile: AuFileName.c,v $ $Revision: 1.1.3.2 $ (DEC) $Date: 1995/09/06 20:11:45 $
$RCSfile: AuRead.c,v $ $Revision: 1.1.3.2 $ (DEC) $Date: 1995/09/06 20:11:49 $
$RCSfile: k5encode.c,v $ $Revision: 1.1.4.2 $ (DEC) $Date: 1995/08/10 20:13:00 $
$RCSfile: krb5_stub.c,v $ $Revision: 1.1.3.2 $ (DEC) $Date: 1995/08/10 20:13:04 $
$RCSfile: FSWrap.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 19:08:32 $
$RCSfile: lcWrap.c,v $ $Revision: 1.1.7.2 $ (DEC) $Date: 1998/10/26 19:08:50 $
$RCSfile: Xtransdnet.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1997/04/25 13:44:23 $
$RCSfile: Xtranssock.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1998/06/15 16:49:09 $
$RCSfile: Xtrans.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 21:39:04 $
$RCSfile: Xtransdnet.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1997/04/25 13:44:23 $
$RCSfile: Xtranssock.c,v $ $Revision: 1.1.14.2 $ (DEC) $Date: 1998/06/15 16:49:09 $
$RCSfile: Xtrans.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1998/10/26 21:39:04 $
$RCSfile: XKBCvt.c,v $ $Revision: 1.1.19.1 $ (DEC) $Date: 1999/09/22 18:22:42 $
$RCSfile: XKBGetMap.c,v $ $Revision: 1.1.11.2 $ (DEC) $Date: 1998/10/26 19:08:41 $
$RCSfile: SetLocale.c,v $ $Revision: 1.1.9.2 $ (DEC) $Date: 1998/10/26 19:08:37 $
$RCSfile: imInt.c,v $ $Revision: 1.1.9.2 $ (DEC) $Date: 1998/10/26 19:08:43 $
$RCSfile: imRm.c,v $ $Revision: 1.1.7.2 $ (DEC) $Date: 1998/10/26 19:08:45 $
$RCSfile: lcDB.c,v $ $Revision: 1.1.5.2 $ (DEC) $Date: 1997/09/29 18:14:25 $
$RCSfile: lcFile.c,v $ $Revision: 1.1.8.2 $ (DEC) $Date: 1999/02/03 19:33:15 $
$RCSfile: lcPublic.c,v $ $Revision: 1.1.9.2 $ (DEC) $Date: 1998/10/26 19:08:48 $
$RCSfile: lcRM.c,v $ $Revision: 1.1.4.2 $ (DEC) $Date: 1995/09/25 20:21:32 $
$RCSfile: lcUTF.c,v $ $Revision: 1.1.6.2 $ (DEC) $Date: 1997/09/29 18:14:31 $
$RCSfile: Compose.c,v $ $Revision: 1.1.2.2 $ (DEC) $Date: 1995/05/09 20:37:19 $
$RCSfile: dechack.c,v $ $Revision: 1.1.2.6 $ (DEC) $Date: 1995/05/16 19:35:56 $
$RCSfile: lcDECConv.c,v $ $Revision: 1.1.2.4 $ (DEC) $Date: 1995/05/26 21:25:39 $
$RCSfile: dnet_stub.c,v $ $Revision: 1.1.4.2 $ (DEC) $Date: 1993/11/02 15:28:09 $
libdnet_stub.so:
$RCSfile: dnet_stub.c,v $ $Revision: 1.1.4.2 $ (DEC) $Date: 1993/11/02 15:28:09 $
March 7, 2002
Page 8