This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: breakpoints/1407: Gdb with gcc on Solaris crashes withsegmentation fault when using "call"


The following reply was made to PR breakpoints/1407; it has been noted by GNATS.

From: "Bruce A. Locke" <blocke@newpaltz.edu>
To: gdb-gnats@sources.redhat.com
Cc: kettenis@gnu.org
Subject: Re: breakpoints/1407: Gdb with gcc on Solaris crashes with
	segmentation fault when using "call"
Date: 09 Oct 2003 17:55:57 -0400

 In reference to bug #1407 in gdb-gnats:
 
 I pulled the CVS branch as specified in a response to the original bug
 report and it does not appear to fix the problem.
 
 The test case is really simple:
 
 int foo(void)
 {
     return 1;
 }
  
 int main(void)
 {
     foo();
     return 1;
 }
 
 
 The compiler and gdb versions:
 
 zodiac:~ > gcc -v
 Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.2/specs
 Configured with: ./configure --prefix=/usr/local
 --enable-languages=c,c++,ada,f77,obj --disable-nls --enable-system-zlib
 --enable-threads
 Thread model: posix
 gcc version 3.2
 zodiac:~ > gdb --version
 GNU gdb 2003-09-18-cvs
 Copyright 2003 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you
 are welcome to change it and/or distribute copies of it under certain
 conditions. 
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for
 details.
 This GDB was configured as "sparc-sun-solaris2.9".
 zodiac:~ > uname -a
 SunOS zodiac 5.9 Generic_112233-08 sun4u sparc SUNW,Ultra-5_10
 
 
 The test:
 
 zodiac:~ > gcc -g -o simpletest simpletest.c
 zodiac:~ > gdb ./simpletest
 GNU gdb 2003-09-18-cvs
 Copyright 2003 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you
 are
 welcome to change it and/or distribute copies of it under certain
 conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for
 details.
 This GDB was configured as "sparc-sun-solaris2.9"...
 (gdb) break main
 Breakpoint 1 at 0x1068c: file simpletest.c, line 10.
 (gdb) run
 Starting program: /home/blocke/simpletest
  
 Breakpoint 1, main () at simpletest.c:10
 10          foo();
 (gdb) next
 11          return 1;
 (gdb) call foo()
  
 Program received signal SIGSEGV, Segmentation fault.
 <function called from gdb>
 The program being debugged was signaled while in a function called from
 GDB.
 GDB remains in the frame where the signal was received.
 To change this behavior use "set unwindonsignal on"
 Evaluation of the expression containing the function (foo) will be
 abandoned.
 (gdb) quit
 The program is running.  Exit anyway? (y or n) y
 
 
 Any input you could offer would be appreciated.  Thank You.
 
 
 -- 
 -----------------------------------------------------------------------
 Bruce A. Locke
 blocke@newpaltz.edu
 WSB 18 - (845)257-3775
 
 Computer Science/UNIX Support
 Academic Computing - Computer Services
 State University of New York at New Paltz
 
 
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]