OSDN Git Service

* generic/gdbtk-cmds.c (gdb_set_inferior_args): set_inferior_args
authorkseitz <kseitz>
Mon, 25 Jan 2010 19:59:29 +0000 (19:59 +0000)
committerkseitz <kseitz>
Mon, 25 Jan 2010 19:59:29 +0000 (19:59 +0000)
now works as expected. Do not strdup/free the argument string.

gdb/gdbtk/ChangeLog
gdb/gdbtk/generic/gdbtk-cmds.c

index 0fb5ac2..a313888 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-25  Keith Seitz  <keiths@redhat.com>
+
+       * generic/gdbtk-cmds.c (gdb_set_inferior_args): set_inferior_args
+       now works as expected. Do not strdup/free the argument string.
+
 2010-01-15  Stan Shebs  <stan@codesourcery.com>
 
        * generic/gdbtk-bp.c (gdb_trace_status): Use current_trace_status.
index 20ead8d..6a249f5 100644 (file)
@@ -859,13 +859,7 @@ gdb_set_inferior_args (ClientData clientData, Tcl_Interp *interp,
     }
 
   args = Tcl_GetStringFromObj (objv[1], NULL);
-
-  /* The xstrdup/xfree stuff is so that we maintain a coherent picture
-     for gdb.  I would expect the accessors to do this, but they
-     don't.  */
-  args = xstrdup (args);
-  args = set_inferior_args (args);
-  xfree (args);
+  set_inferior_args (args);
 
   return TCL_OK;
 }