I'm using gdb V5 I downloaded from CVS a couple of weeks ago.
I compiled it host=i386-linux, target=arm-linux.
I'm doing remote debugging to a Cirrus EDB7211 ARM7
evaluation board using the same gdb version's gdbserver.
I created the following program:
char foo[] = "init";
main(int argc, char **argv)
{
int x=0;
int y=0; //Put breakpoint here, single step past it
int z=0;
char* bar;
//char foo[] = "init"; //results in SIGSEGV
bar = foo;
}
As commented, I put a breakpoint on the 'y' line and single step.
The above works fine as-is.
But if I move the declaration of 'foo' to inside 'main', I get
a SIGSEGV when I single-step execute the 'foo' line.
During my permutations trying to establish exactly what happened,
I also got a "Cannot find bounds of current function" but I was
unable to reproduce it later to track it down (after I tracked down
the nature of the SIGSEGV message).
Can anybody please point me in some direction to track this down?
TIA!
-PaulK