From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Cogen To: dan@cgsoftware.com Cc: kettenis@wins.uva.nl, gdb@sourceware.cygnus.com Subject: Re: gdb seg violation during print command Date: Thu, 04 May 2000 11:06:00 -0000 Message-id: <200005041802.OAA23768@ll.mit.edu> References: X-SW-Source: 2000-05/msg00020.html > First off, your code is broken. You claim to return an int, but don't. > This is what is causing the segfault in gdb. > It's impossible for us to not believe the compiler when it says "this > function returns an int". We expect it to return an int. Sorry, that's not it. I have also tried the following: #include int tteesstt11 (int) { cerr << "\n"; return 4; } int main () { } print tteesstt11(1) from a breakpoint in main() still causes gdb to seg fault. Indeed, I have tried lots of forms for tteesstt11; they all seg fault. > In the newer gdb, what'll happen is you'll get no segfault, but a weird number > returned, which will actually the address of the function, which is > the last value we have around, i guess. Have you actually tried this or are you supposing? Where can I get the "newer" gdb? What version is the "newer" gdb? -- DavidC