* python/python.c (execute_gdb_command): Copy the argument text.
This commit is contained in:
parent
b8b4e42bde
commit
86c6265d62
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2009-11-09 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* python/python.c (execute_gdb_command): Copy the argument text.
|
||||||
|
|
||||||
2009-11-06 Vladimir Prus <vladimir@codesourcery.com>
|
2009-11-06 Vladimir Prus <vladimir@codesourcery.com>
|
||||||
|
|
||||||
* m68k-tdep.c (m68k_convert_register_p): Correct
|
* m68k-tdep.c (m68k_convert_register_p): Correct
|
||||||
|
|
|
@ -309,7 +309,11 @@ execute_gdb_command (PyObject *self, PyObject *args)
|
||||||
|
|
||||||
TRY_CATCH (except, RETURN_MASK_ALL)
|
TRY_CATCH (except, RETURN_MASK_ALL)
|
||||||
{
|
{
|
||||||
execute_command (arg, from_tty);
|
/* Copy the argument text in case the command modifies it. */
|
||||||
|
char *copy = xstrdup (arg);
|
||||||
|
struct cleanup *cleanup = make_cleanup (xfree, copy);
|
||||||
|
execute_command (copy, from_tty);
|
||||||
|
do_cleanups (cleanup);
|
||||||
}
|
}
|
||||||
GDB_PY_HANDLE_EXCEPTION (except);
|
GDB_PY_HANDLE_EXCEPTION (except);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue