diff options
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/python/py-record-btrace.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d026da0..47f879f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2018-10-05 Tom de Vries <tdevries@suse.de> + + * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in + PyArg_ParseTuple call. + 2018-10-04 Joel Brobecker <brobecker@adacore.com> * psymtab.c (recursively_search_psymtabs): Reformat parameters diff --git a/gdb/python/py-record-btrace.c b/gdb/python/py-record-btrace.c index 057475e..44cb441 100644 --- a/gdb/python/py-record-btrace.c +++ b/gdb/python/py-record-btrace.c @@ -776,15 +776,17 @@ recpy_bt_goto (PyObject *self, PyObject *args) const recpy_record_object * const record = (recpy_record_object *) self; thread_info *const tinfo = record->thread; const recpy_element_object *obj; + PyObject *parse_obj; if (tinfo == NULL || btrace_is_empty (tinfo)) return PyErr_Format (gdbpy_gdb_error, _("Empty branch trace.")); - if (!PyArg_ParseTuple (args, "O", &obj)) + if (!PyArg_ParseTuple (args, "O", &parse_obj)) return NULL; - if (Py_TYPE (obj) != &recpy_insn_type) + if (Py_TYPE (parse_obj) != &recpy_insn_type) return PyErr_Format (PyExc_TypeError, _("Argument must be instruction.")); + obj = (const recpy_element_object *) parse_obj; TRY { |