From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14851 invoked by alias); 23 Dec 2003 14:56:08 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 14829 invoked from network); 23 Dec 2003 14:56:03 -0000 Received: from unknown (HELO e5.ny.us.ibm.com) (32.97.182.105) by sources.redhat.com with SMTP; 23 Dec 2003 14:56:03 -0000 Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com [9.56.224.150]) by e5.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id hBNEu19n437756 for ; Tue, 23 Dec 2003 09:56:01 -0500 Received: from srikrishnan (d01av02.pok.ibm.com [9.56.224.216]) by northrelay02.pok.ibm.com (8.12.10/NCO/VER6.6) with SMTP id hBNEtwoM200304; Tue, 23 Dec 2003 09:55:59 -0500 Message-ID: <00c701c3c965$424c6a90$fd0eb609@srikrishnan> From: "srikrish" To: Subject: gdb stack trace shows only those frames after the signal Date: Tue, 23 Dec 2003 14:56:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-SW-Source: 2003-12/txt/msg00255.txt.bz2 Hi,After handling a signal the previous stack trace is lost. Is this a known problem? Any fixes?Hardware Environment: Intel x86Software Environment:Linux RHEL 3; gdb-5.3.90-0.20030710.40rh; glibc 2.3.2-95.6; gcc 3.2.3 20030502 Also occurs with SuSE Linux.Steps to Reproduce:1. compile the testcase (under Additinal Info below) with "gcc -o t mytrap.c"2. run "t"3. attach gdb to the "t"'s PID and type "where"Actual Results:[root@localhost root]# gdbGNU gdb Red Hat Linux (5.3.90-0.20030710.40rh)This GDB was configured as "i386-redhat-linux-gnu".(gdb) attach 2032Attaching to process 2032Reading symbols from /home/krishna/t...done.Using host libthread_db library "/lib/libthread_db.so.1".Reading symbols from /lib/libc.so.6...done.Loaded symbols for /lib/libc.so.6Reading symbols from /lib/ld-linux.so.2...done.Loaded symbols for /lib/ld-linux.so.20xb755d8cb in pause () from /lib/libc.so.6(gdb) where#0 0xb755d8cb in pause () from /lib/libc.so.6#1 0x0804840f in function2 () at mytrap.c:8#2 0x0804842c in function1 () at mytrap.c:15#3 0x08048449 in SIGSEGVhandler (sig=11, info=0xbfffa5a0, ucontext=0xbfffa620) at mytrap.c:22#4 (gdb) frame 5#0 0x00000000 in ?? ()(gdb)Expected Results:the stack traceback should display functionb, functiona, and main for this testcasemytrap.c:#include #include #include void function2( void ){ printf( "Now in function2.. pausing.. pid = %d\n", getpid() ); pause();}void function1( void ){ printf( "Now in function1\n" ); function2();}void SIGSEGVhandler( int sig, siginfo_t *info, void *ucontext ){ printf( "Now in SIGSEGVhandler\n" ); function1();}void functionb( void ){ char *p = NULL; printf( "Now in functionb... causing sig11...\n" ); *p = 'x'; /* forcing SEGFAULT */}void functiona( void ){ printf( "Now in functiona\n" ); functionb();}int main( void ){ struct sigaction newact; struct sigaction oldact; newact.sa_sigaction = SIGSEGVhandler; newact.sa_flags = SA_SIGINFO; sigaction( SIGSEGV, &newact, &oldact ); printf( "About to call functiona\n" ); functiona(); return 0;}Srikrishnan