gdb -write, core dumps
Nitin Gupta
toolchain@gmail.com
Mon Mar 7 22:24:00 GMT 2005
BTW, It is bug #1410 in GDB bugs list.
http://www.gnu.org/software/gdb/bugs/
I am not sure if there is a patch available for it.
On Wed, 2 Mar 2005 15:45:53 -0800, Nitin Gupta <toolchain@gmail.com> wrote:
> I see that "gdb -write" is doing a core dump, while modifying the binary.
> I see this problem on gdb-6.1 as well as on gdb-6.3
>
> Any suggestion on what I might be doing wrong?
>
> foo.c:
> volatile int i=4;
> main() { }
>
> gcc -g foo.c -o foo
>
> Then, patch the global variable:
>
> gdb -write foo
> .....
>
> (gdb) p i
> $1 = 4
> (gdb) p i=3
> $2 = 3
> (gdb) q
> Segmentation fault
>
More information about the Gdb
mailing list