OSDN Git Service

* generic/gdbtk-cmds.c (gdb_clear_file): The global "attach_flag"
authorkseitz <kseitz>
Mon, 22 Sep 2008 18:32:41 +0000 (18:32 +0000)
committerkseitz <kseitz>
Mon, 22 Sep 2008 18:32:41 +0000 (18:32 +0000)
        is now per-inferior.

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

index 6d856d9..49f2fd9 100644 (file)
@@ -1,3 +1,8 @@
+2008-09-22  Keith Seitz  <keiths@redhat.com>
+
+       * generic/gdbtk-cmds.c (gdb_clear_file): The global "attach_flag"
+       is now per-inferior.
+
 2008-09-19  Denis Pilat  <denis.pilat@st.com>
 
        * generic/gdbtk-bp.c (gdb_get_breakpoint_info): Manage the case of NULL
index 3babc8c..b7a3f38 100644 (file)
@@ -456,7 +456,8 @@ gdb_clear_file (ClientData clientData, Tcl_Interp *interp,
 
   if (! ptid_equal (inferior_ptid, null_ptid) && target_has_execution)
     {
-      if (attach_flag)
+      struct inferior *inf = current_inferior ();
+      if (inf->attach_flag)
        target_detach (NULL, 0);
       else
        target_kill ();