[PATCH] Small segfault fix when there is no python

Daniel Gutson daniel.gutson@tallertechnologies.com
Thu Mar 20 16:33:00 GMT 2014


Hi,

   the small attached patch prevents gdb to segfault when an extension
language definition has no ops,
which e.g. occurs when HAVE_PYTHON is not defined so
extension_language_python remains with ops in NULL.
This causes the line
   if (extlang->ops->eval_from_control_command != NULL)
(in eval_ext_lang_from_control_command) to dereference a null pointer.

Please commit it for me if approved since I don't have write access.

Thanks,

   Daniel.


    2014-03-20    Daniel Gutson (daniel.gutson@tallertechnologies.com)

gdb/
    * extension.c: (eval_ext_lang_from_control_command) Added check to
prevent dereference of null pointer.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python.patch
Type: text/x-patch
Size: 768 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20140320/7b6e0362/attachment.bin>


More information about the Gdb-patches mailing list