From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14011 invoked by alias); 28 Jun 2004 11:14:27 -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 13622 invoked from network); 28 Jun 2004 11:14:24 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 28 Jun 2004 11:14:24 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i5SBENe1024445 for ; Mon, 28 Jun 2004 07:14:23 -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 i5SBEMw06459 for ; Mon, 28 Jun 2004 07:14:23 -0400 Received: from cygbert.vinschen.de (vpn50-35.rdu.redhat.com [172.16.50.35]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i5SBELP17250 for ; Mon, 28 Jun 2004 04:14:21 -0700 Received: by cygbert.vinschen.de (Postfix, from userid 500) id 142AC582E2; Mon, 28 Jun 2004 13:14:19 +0200 (CEST) Date: Mon, 28 Jun 2004 11:14:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: Re: [RFA] infcmd.c: Fix UI problem in attach_command Message-ID: <20040628111418.GA21679@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com References: <20040626121121.GC8039@cygbert.vinschen.de> <9003-Sun27Jun2004201103+0300-eliz@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9003-Sun27Jun2004201103+0300-eliz@gnu.org> User-Agent: Mutt/1.4.2i X-SW-Source: 2004-06/txt/msg00630.txt.bz2 On Jun 27 20:11, Eli Zaretskii wrote: > > Date: Sat, 26 Jun 2004 14:11:21 +0200 > > From: Corinna Vinschen > > > > Before trying to load the executable's symbol table, attach_command > > calls target_terminal_inferior(). > > Do you (or anyone else, like Elena) know why do we relinquish the > terminal to the inferior while loading the symbol table? It sounds > like a strange thing to do at this point. I don't know and it sounds strange to me as well. I've tested a simlified patch which just moves the call to target_terminal_inferior right before the normal_stop call. It works as good as my original patch, but I'm not sure if there's a specific situation which requires an early switch to the inferior. Corinna * infcmd.c (attach_command): Move call to target_terminal_inferior behind loading symbol table. Index: infcmd.c =================================================================== RCS file: /cvs/src/src/gdb/infcmd.c,v retrieving revision 1.117 diff -u -p -r1.117 infcmd.c --- infcmd.c 20 Jun 2004 18:10:14 -0000 1.117 +++ infcmd.c 28 Jun 2004 11:11:15 -0000 @@ -1788,9 +1788,6 @@ attach_command (char *args, int from_tty based on what modes we are starting it with. */ target_terminal_init (); - /* Install inferior's terminal modes. */ - target_terminal_inferior (); - /* Set up execution context to know that we should return from wait_for_inferior as soon as the target reports a stop. */ init_wait_for_inferior (); @@ -1849,6 +1846,9 @@ attach_command (char *args, int from_tty */ target_post_attach (PIDGET (inferior_ptid)); + /* Install inferior's terminal modes. */ + target_terminal_inferior (); + normal_stop (); if (deprecated_attach_hook) -- Corinna Vinschen Cygwin Co-Project Leader Red Hat, Inc.