+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>
* m68k-tdep.c (m68k_convert_register_p): Correct
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);