Hello People,

 This might be slightly offtopic, but c-related anyway..
I wonder if anyone could explain me abit
things, which generates gdb when prints
 why code died :
 consider following example:

(example is taken from Bugtraq list.)
[root@blackstar coding]# /usr/sbin/smbmount //a/b /
Segmentation fault (core dumped)
[root@blackstar coding]# gdb /usr/sbin/smbmount core
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (i586-unknown-linux), Copyright 1996 Free Software Foundation,
Inc...
(no debugging symbols found)...
Core was generated by `AAAAAAAAAAAAAAAAAAAAAAAAAAA'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.5.3.12...(no debugging symbols
found)...done.
Reading symbols from /lib/ld-linux.so.1...(no debugging symbols
found)...done.
#0  0x400775d7 in strncmp ()
(gdb)
-----------------------------
questions:
Core was generated by 'AAAAA...'
 what does it mean?  core generated when gdb tried to execute this piece
of code? or, just this piece of string went out the segment?
..
 and: in  strncmp.......
means that this happens while executing strncmp () at 0x400775d7 offset?
right? .. is there any way to figure out what exactly piece of code
generates this without recompiling the code with debugging mode?

 Thanks beforehands..
Fyodor

Reply via email to