Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Paul Pluzhnikov" <ppluzhnikov@google.com>
To: "Paul Pluzhnikov" <ppluzhnikov@google.com>, gdb-patches@sourceware.org
Subject: Re: [RFC] gdb could leave inferior running as a background process
Date: Tue, 22 Apr 2008 17:56:00 -0000	[thread overview]
Message-ID: <8ac60eac0804220946r689605e1pd4803c2aea3a9e07@mail.gmail.com> (raw)
In-Reply-To: <20080422155548.GA13076@caradoc.them.org>

[-- Attachment #1: Type: text/plain, Size: 717 bytes --]

On Tue, Apr 22, 2008 at 8:55 AM, Daniel Jacobowitz <drow@false.org> wrote:

>  Sorry, don't think this will work reliably.  If the target tried to
>  read after it was resumed but before the call to target_wait, and GDB
>  had the terminal, then it will have a pending SIGTTIN already at this
>  point.

I see.

My preferred way of fixing this was to have warning() restore
terminal to inferior if it wasn't ours when warning was called,
but that's not how the rest of the code is structured.

Would attached patch work better then?

Thanks,
-- 
Paul Pluzhnikov


2008-04-22  Paul Pluzhnikov  <ppluzhnikov@google.com>

     * gdb/target.h (target_resume): Call target_terminal_inferior before
     resuming inferior.

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 584 bytes --]

2008-04-22  Paul Pluzhnikov  <ppluzhnikov@google.com>

     * gdb/target.h (target_resume): Call target_terminal_inferior before
     resuming inferior.

--- ../../../vendor_src/gdb/gdb-6.8.x/gdb/target.h	2008-03-25 09:51:34.779643000 -0700
+++ gdb/target.h	2008-04-22 09:27:16.894610000 -0700
@@ -573,6 +573,7 @@ extern void target_disconnect (char *, i
 #define	target_resume(ptid, step, siggnal)				\
   do {									\
     dcache_invalidate(target_dcache);					\
+    target_terminal_inferior ();					\
     (*current_target.to_resume) (ptid, step, siggnal);			\
   } while (0)
 

  reply	other threads:[~2008-04-22 16:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-22 16:12 Paul Pluzhnikov
2008-04-22 17:40 ` Daniel Jacobowitz
2008-04-22 17:56   ` Paul Pluzhnikov [this message]
2008-04-22 18:05     ` Paul Pluzhnikov
2008-04-22 19:55       ` Daniel Jacobowitz
2008-04-22 20:29         ` Paul Pluzhnikov
     [not found]           ` <20080422195515.GA28506@caradoc.them.org>
2008-04-22 21:35             ` Doug Evans
2008-04-22 22:09               ` Daniel Jacobowitz
2008-04-23  2:19                 ` Doug Evans
2008-04-23  3:54                   ` Daniel Jacobowitz

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=8ac60eac0804220946r689605e1pd4803c2aea3a9e07@mail.gmail.com \
    --to=ppluzhnikov@google.com \
    --cc=gdb-patches@sourceware.org \
    /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