This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: gdb seg violation during print command
- To: dan at cgsoftware dot com
- Subject: Re: gdb seg violation during print command
- From: David Cogen <cogen at ll dot mit dot edu>
- Date: Thu, 4 May 2000 09:27:26 -0400 (EDT)
- CC: kettenis at wins dot uva dot nl, gdb at sourceware dot cygnus dot com
> 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 <iostream>
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