From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6065 invoked by alias); 22 Aug 2002 13:54:10 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5883 invoked from network); 22 Aug 2002 13:54:09 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 22 Aug 2002 13:54:09 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g7MDdel17409 for ; Thu, 22 Aug 2002 09:39:40 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g7MDs7u15453 for ; Thu, 22 Aug 2002 09:54:07 -0400 Received: from cygbert.vinschen.de (vpn50-9.rdu.redhat.com [172.16.50.9]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g7MDs6e16155 for ; Thu, 22 Aug 2002 06:54:06 -0700 Received: (from corinna@localhost) by cygbert.vinschen.de (8.11.6/8.9.3/Linux sendmail 8.9.3) id g7MDs2B29193 for gdb-patches@sources.redhat.com; Thu, 22 Aug 2002 15:54:02 +0200 Date: Thu, 22 Aug 2002 07:49:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: [RFA] aix-thread.c: Allow retargeting of threaded targets Message-ID: <20020822155402.I26346@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.22.1i X-SW-Source: 2002-08/txt/msg00686.txt.bz2 Hi, the following problem occurs on AIX, when the user examines a core file of a threaded target: $ gdb -nw application core [...] (gdb) run Starting program: application You can't do that without a process to debug. (gdb) quit The program is running. Exit anyway? (y or n) y You can't do that without a process to debug. (gdb) Even detaching from the core doesn't help since the current code doesn't detach in a way so that the aix-thread code would be able to reinitializes on "run". The following fix corrects the detach command in that case, so that the user can run and/or quit gdb by explicitely detaching. This doesn't solve the still outstanding problem, that the "run" command should implicitely detach from the previous target, if that was a core file. Corinna ChangeLog: 2002-08-21 Corinna Vinschen * aix-thread.c (aix_thread_detach): Disable thread debugging on detach to allow reinitialization. Index: aix-thread.c =================================================================== RCS file: /cvs/src/src/gdb/aix-thread.c,v retrieving revision 1.13 diff -u -p -r1.13 aix-thread.c --- aix-thread.c 27 Jul 2002 00:06:19 -0000 1.13 +++ aix-thread.c 22 Aug 2002 13:41:35 -0000 @@ -926,7 +926,7 @@ aix_thread_attach (char *args, int from_ static void aix_thread_detach (char *args, int from_tty) { - pd_deactivate (); + pd_disable (); base_target.to_detach (args, from_tty); } -- Corinna Vinschen Cygwin Developer Red Hat, Inc. mailto:vinschen@redhat.com