From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Berlin To: David Cogen Cc: kettenis@wins.uva.nl, gdb@sourceware.cygnus.com Subject: Re: gdb seg violation during print command Date: Thu, 04 May 2000 10:41:00 -0000 Message-id: References: <200005041655.MAA10513@ll.mit.edu> X-SW-Source: 2000-05/msg00018.html > > 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. Okay. Well, it works perfectly for me once i add the return. Prints the newline, then 4. > > > 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? How would i know what it did if i didn't try it? > Where can I get the "newer" > gdb? sourceware.cygnus.com Look at the gdb page. > What version is the "newer" gdb? > You have a few choices. You can get a 5.0 snapshot, or the main branch. Doesn't matter, anything newer than February (when i became the C++ maintainer and started fixing this stuff) should work fine. And does, for me. On x86 Linux, and BeOS. > -- DavidC >