"maint print arch" causing gdb crash
ali_anwar
ali_anwar@codesourcery.com
Fri Oct 5 14:15:00 GMT 2012
Hi,
'gdbarch_dump' is in some cases passing a NULL pointer to 'sprintf' when
printing 'gdbarch->stap_gdb_register_suffix' etc. Printing NULL
pointers like this is undefined behavior. With glibc passing a NULL
pointer just prints "(null)". With the MSVC libc, however, GDB crashes.
Attached patch fixes this issue using the similar approach discussed in
following scenario:
http://sourceware.org/ml/gdb-patches/2011-10/msg00662.html
There are some newly added variables due to which "maint print arch"
command was causing gdb crash on whindows host. This patch takes care of
them.
OK?
Thanks,
-Ali
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdb_crash.patch
Type: text/x-patch
Size: 6359 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20121005/5d8df6ac/attachment.bin>
More information about the Gdb-patches
mailing list