This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

how to show cause of segmentation fault with gdb


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]