From: "Pedro Alves" <pedro_alves@portugalmail.pt>
To: "Pierre Muller" <muller@ics.u-strasbg.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [win32] Fix suspend count handling
Date: Wed, 21 Nov 2007 15:08:00 -0000 [thread overview]
Message-ID: <4053daab0711210708o607018b9n8b63147a8498a207@mail.gmail.com> (raw)
In-Reply-To: <000401c82c48$a450df10$ecf29d30$@u-strasbg.fr>
On Nov 21, 2007 2:13 PM, Pierre Muller wrote:
> Your patch does indeed correct this to 3, which is what is wanted.
> But if you use 'continue' instead of 'next' when you are at line
> 37, you will get '4' printed out instead of three, because
> the main thread will have call SuspendThread before gdb does.
> This is at least what happens on my computer.
>
Are you sure this was from a gdb with this patch installed? I get 4
without the patch, but with this patch (*without* the other
watchpoint patch on top) I still get 3 no matter how I try it:
$ gdb/gdb.exe main.exe
GNU gdb 6.7.50.20071121
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) b 37
Breakpoint 1 at 0x40119a: file main.c, line 37.
(gdb) r
Starting program: /d/gdb/build/main.exe
Breakpoint 1, main (argc=1, argv=0x6b3270) at main.c:37
37 suspend_count = ResumeThread (h); /* set breakpoint here */
(gdb) c
Continuing.
3
Program exited normally.
(gdb)
>
> OK, in that case it is indeed correct to do all the ResumeThread calls
> before ContinueDebugEvent is called, and thus the suspend_count can be
> replaced
> by suspended Boolean value.
Not a boolean, its a three state -- suspend_count also accepted -1, and I've
kept that.
> But only the combination of the two patches will ensure to
> always obtain '3' using 'continue' or 'next'.
That's not what I see here. Can you show me a run where you get 4
only this patch applied?
Cheers,
Pedro Alves
next prev parent reply other threads:[~2007-11-21 15:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-21 0:35 Pedro Alves
2007-11-21 11:25 ` Pierre Muller
2007-11-21 13:43 ` Pedro Alves
2007-11-21 14:13 ` Pierre Muller
2007-11-21 15:08 ` Pedro Alves [this message]
2007-11-21 15:32 ` Pierre Muller
2007-11-21 18:19 ` Pedro Alves
2007-11-21 23:33 ` Pedro Alves
2007-11-22 9:19 ` Pierre Muller
2007-11-23 1:07 ` Christopher Faylor
2007-11-23 10:19 ` Lerele
2007-11-23 18:30 ` Lerele
2007-11-24 12:43 ` Pedro Alves
2007-11-24 14:21 ` Lerele
2007-11-24 5:33 ` Christopher Faylor
2007-11-24 14:18 ` Lerele
2007-11-24 15:49 ` Pedro Alves
2007-11-24 17:50 ` Lerele
2007-11-24 20:49 ` Christopher Faylor
2007-11-24 20:48 ` Christopher Faylor
2007-11-25 14:44 ` Lerele
2007-11-25 18:13 ` Christopher Faylor
2007-11-25 18:56 ` Pedro Alves
2007-11-25 22:05 ` Christopher Faylor
2007-11-25 22:13 ` Lerele
2007-11-25 20:34 ` Lerele
2007-11-24 12:16 ` Pedro Alves
2007-11-24 20:51 ` Christopher Faylor
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=4053daab0711210708o607018b9n8b63147a8498a207@mail.gmail.com \
--to=pedro_alves@portugalmail.pt \
--cc=gdb-patches@sourceware.org \
--cc=muller@ics.u-strasbg.fr \
/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