This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
[PATCH] attach_flag now per-inferior
- From: Keith Seitz <keiths at redhat dot com>
- To: insight <insight at sourceware dot org>
- Date: Mon, 22 Sep 2008 11:35:08 -0700
- Subject: [PATCH] attach_flag now per-inferior
Hi,
I've committed the attached patch which fixes a recent build breakage
introduced by some churn in gdb to eliminate the global "attach_flag"
and make it dependent on an inferior.
With any luck, gdb will see continued obliteration of globals.
Unfortunately, this did not make it into the snapshot this week.
Keith
ChangeLog
2008-09-22 Keith Seitz <keiths@redhat.com>
* generic/gdbtk-cmds.c (gdb_clear_file): The global "attach_flag"
is now per-inferior.
Index: generic/gdbtk-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
retrieving revision 1.104
diff -u -p -r1.104 gdbtk-cmds.c
--- generic/gdbtk-cmds.c 18 Sep 2008 18:28:45 -0000 1.104
+++ generic/gdbtk-cmds.c 22 Sep 2008 18:32:07 -0000
@@ -456,7 +456,8 @@ gdb_clear_file (ClientData clientData, T
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 ();