[PATCH, GDB] Fix Windows gdb build failure with python support

Thomas Preudhomme thomas.preudhomme@foss.arm.com
Thu Apr 6 14:28:00 GMT 2017


Hi,

GDB fails to build for Windows host with python support enabled due to
python_file's second argument being of type char * and being passed a
string litteral. This patch takes the conservative assumptions that the
function might indeed modify the character string and use a local char
array to pass the mode instead.

ChangeLog entry is as follows:

*** gdb/ChangeLog ***

2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>

         * python/python.c (python_run_simple_file): Pass mode as a char
         pointer using local char array.

Testing: build for Windows with python support succeed with this patch and fails 
without.

Is this ok to commit to master?

Best regards,

Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_gdb_windows_build_failure.patch
Type: text/x-patch
Size: 789 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20170406/cfeb3c21/attachment.bin>


More information about the Gdb-patches mailing list