From: Christopher Faylor <cgf-use-the-mailinglist-please@sourceware.org>
To: gdb-patches@sourceware.org, Pierre Muller <muller@ics.u-strasbg.fr>
Subject: Re: [RFC] win32-nat.c 'set new-console' and interruption
Date: Sat, 21 Jun 2008 18:37:00 -0000 [thread overview]
Message-ID: <20080621170521.GB2470@ednor.casa.cgf.cx> (raw)
In-Reply-To: <000001c8d330$0c6b51f0$2541f5d0$@u-strasbg.fr>
On Sat, Jun 21, 2008 at 01:47:48AM +0200, Pierre Muller wrote:
>@@ -1076,7 +1079,13 @@ handle_exception (struct target_waitstat
> break;
> case EXCEPTION_BREAKPOINT:
> DEBUG_EXCEPTION_SIMPLE ("EXCEPTION_BREAKPOINT");
>- ourstatus->value.sig = TARGET_SIGNAL_TRAP;
>+ if (CtrlBreakSent)
>+ {
>+ CtrlBreakSent = 0;
>+ ourstatus->value.sig = TARGET_SIGNAL_INT;
>+ }
>+ else
>+ ourstatus->value.sig = TARGET_SIGNAL_TRAP;
> break;
> case DBG_CONTROL_C:
> DEBUG_EXCEPTION_SIMPLE ("DBG_CONTROL_C");
This seems like a race condition to me. You can't be guaranteed
that the breakpoint you're receiving is not a valid breakpoint.
It would be better to check if it is a valid breakpoint and, if
not, and iff CtrlBreakSent was true then do this.
But two other observations:
1. I believe that MixedCase like this is against GNU coding standards but,
even if it isn't, the convention in win32-nat.c is to use lowercase and
underscores: ctrl_break_sent.
2. What is newconsole good for? I never use it and wonder if it
shouldn't just be nuked. My usual refrain applies here: Is there
anything similar in regular gdb?
cgf
next prev parent reply other threads:[~2008-06-21 17:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-21 17:05 Pierre Muller
2008-06-21 18:37 ` Christopher Faylor [this message]
2008-06-22 3:17 ` Daniel Jacobowitz
2008-06-22 3:18 ` Corinna Vinschen
2008-06-23 1:04 ` Christopher Faylor
2008-06-23 1:10 ` Corinna Vinschen
2008-06-23 7:40 ` Pierre Muller
2008-06-23 12:00 ` Christopher Faylor
2008-06-23 16:05 ` Pierre Muller
2008-06-23 17:00 ` Pedro Alves
2008-06-23 17:25 ` Pierre Muller
2008-06-23 18:03 ` Christopher Faylor
2008-06-23 19:24 ` Pedro Alves
2008-06-23 20:33 ` Pierre Muller
2008-06-23 21:06 ` Joel Brobecker
2008-06-24 6:33 ` Christopher Faylor
2008-06-24 13:36 ` [RFC-v3] " Pierre Muller
2008-06-24 2:33 ` [RFC] " Christopher Faylor
2008-06-24 13:54 ` Pedro Alves
2008-06-24 18:29 ` Christopher Faylor
2008-06-22 9:00 ` Christopher Faylor
2008-06-23 8:52 ` [RFC v2] " Pierre Muller
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=20080621170521.GB2470@ednor.casa.cgf.cx \
--to=cgf-use-the-mailinglist-please@sourceware.org \
--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