This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
how to show cause of segmentation fault with gdb
- From: Oliver Block <lists at block-online dot eu>
- To: gdb at sourceware dot org
- Date: Wed, 21 Jun 2006 00:52:45 +0200
- Subject: how to show cause of segmentation fault with gdb
- Reply-to: lists at block-online dot eu
Hi,
the last days I faced the following problem. I was writing a program that used
c-client library. I defined and assigned a
char *myvar;
and the function expected a
char myvar[];
Because a deeper function needed write access to that variable the program
stopped with a segmentation fault. Someone else gave me a hint which is most
likely the cause of the error. But he guessed, actually.
Is there a safe way show the cause of that error using gdb.
Best Regards,
Oliver