aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/python/python.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 880af5b..e906b87 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ * python/python.c (python_run_simple_file): Cast mode literal to
+ non-const char pointer as expected by PyFile_FromString.
+
2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
* common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
diff --git a/gdb/python/python.c b/gdb/python/python.c
index cc58267..e0e24ac 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -352,7 +352,7 @@ python_run_simple_file (FILE *file, const char *filename)
/* Because we have a string for a filename, and are using Python to
open the file, we need to expand any tilde in the path first. */
gdb::unique_xmalloc_ptr<char> full_path (tilde_expand (filename));
- gdbpy_ref<> python_file (PyFile_FromString (full_path.get (), "r"));
+ gdbpy_ref<> python_file (PyFile_FromString (full_path.get (), (char *) "r"));
if (python_file == NULL)
{
gdbpy_print_stack ();