Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Christopher Faylor <cgf-use-the-mailinglist-please@sourceware.org>
To: Pedro Alves <pedro_alves@portugalmail.pt>, gdb-patches@sourceware.org
Subject: Re: [Cygwin] Fix for: detaching crashes the inferior.
Date: Thu, 19 Apr 2007 12:20:00 -0000	[thread overview]
Message-ID: <20070419044139.GA24029@trixie.casa.cgf.cx> (raw)
In-Reply-To: <4053daab0704100345x5eee0dcav7104180ad93e5750@mail.gmail.com>

On Tue, Apr 10, 2007 at 11:45:39AM +0100, Pedro Alves wrote:
>On 4/10/07, Christopher Faylor wrote:
>
>>Are you sure you aren't seeing problems when you attach/detach more than
>>once?  I know that there is someplace that isn't getting cleared in that
>>scenario.  I have thought that I fixed that problem a few times but it
>>still seems to be there in the latest cygwin release.
>>
>
>I tried that many times, with the following test program:
>
>$ cat main.c
>#include <stdio.h>
>#include <windows.h>
>
>int
>main(int argc, char** argv)
>{
> int count = 0;
> while (1)
>   {
>     printf ("count = %d\n", count++);
>     fflush (stdout);
>     Sleep (1000);
>   }
>}
>
>I attached with gdb --pid <pid>, set a break on line 9, continue,
>breakpoint is hit, hit next a couple of times, detach, reattach without
>restarting gdb, continue till the breakpoint, step a couple times,
>remove breakpoint, detach, restart gdb, attach, do the same, but
>letting gdb start the inferior as a child, redo the testing a couple of
>times, and nothing bad happens...

I'm not necessarily talking about attaching and restarting the same
program multiple times.  I don't know the exact scenario when I see the
problem (or I probably would have fixed it) but I think it is possibly
when attaching after doing a normal "gdb program" or maybe just killing
and rerunning after attaching.

Like I said, I don't know for sure but I wasn't asking you to fix the
problem.  Go ahead and check in what you've got.

cgf


  reply	other threads:[~2007-04-19  4:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-08 11:37 Pedro Alves
2007-04-08 23:03 ` Pedro Alves
2007-04-09  2:08   ` Pedro Alves
2007-04-09  7:06     ` Eli Zaretskii
2007-04-10 10:33       ` Pedro Alves
2007-04-10 12:07         ` Daniel Jacobowitz
2007-04-10 18:35         ` Michael Snyder
2007-04-10 18:58         ` Eli Zaretskii
2007-04-10  5:15     ` Christopher Faylor
2007-04-10  9:31       ` Corinna Vinschen
2007-04-10 10:48         ` Pedro Alves
2007-04-10 10:45       ` Pedro Alves
2007-04-19 12:20         ` Christopher Faylor [this message]
2007-04-19 22:06           ` Pedro Alves
2007-04-10 21:40       ` Pedro Alves
2007-04-13 13:40         ` 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=20070419044139.GA24029@trixie.casa.cgf.cx \
    --to=cgf-use-the-mailinglist-please@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro_alves@portugalmail.pt \
    /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