Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFA] infcmd.c: Fix UI problem in attach_command
Date: Mon, 28 Jun 2004 11:14:00 -0000	[thread overview]
Message-ID: <20040628111418.GA21679@cygbert.vinschen.de> (raw)
In-Reply-To: <9003-Sun27Jun2004201103+0300-eliz@gnu.org>

On Jun 27 20:11, Eli Zaretskii wrote:
> > Date: Sat, 26 Jun 2004 14:11:21 +0200
> > From: Corinna Vinschen <vinschen@redhat.com>
> > 
> > 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.


  reply	other threads:[~2004-06-28 11:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-26 12:11 Corinna Vinschen
2004-06-27 17:15 ` Eli Zaretskii
2004-06-28 11:14   ` Corinna Vinschen [this message]
2004-06-28 17:03     ` Eli Zaretskii
2004-06-28 17:09       ` Daniel Jacobowitz
2004-06-28 22:14         ` Jim Blandy
2004-06-29  6:39           ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040628111418.GA21679@cygbert.vinschen.de \
    --to=vinschen@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox