* [RFA] Add handling of Ctrl-Break for win32 native target.
@ 2002-02-04 7:05 Pierre Muller
2002-02-04 7:09 ` Eli Zaretskii
2002-02-04 8:52 ` Christopher Faylor
0 siblings, 2 replies; 9+ messages in thread
From: Pierre Muller @ 2002-02-04 7:05 UTC (permalink / raw)
To: gdb-patches
Ctrl-Break exception is not handled by
current win32-nat.c code.
The following patch fixes this.
Pending behind this patch is another one that tries to
handle the problem of passing the exception down to the debuggee or not
depending on pass state .
(Problem signaled by the several FIXME in handle_exception).
2002-02-04 Pierre Muller <muller@ics.u-strasbg.fr>
win32-nat.c (handle_exception): Handle Ctrl-Break exception.
Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.44
diff -u -r1.44 win32-nat.c
--- win32-nat.c 2002/02/04 11:00:05 1.44
+++ win32-nat.c 2002/02/04 14:57:24
@@ -867,6 +867,12 @@
ourstatus->value.sig = TARGET_SIGNAL_INT;
last_sig = SIGINT; /* FIXME - should check pass state */
break;
+ case DBG_CONTROL_BREAK:
+ DEBUG_EXCEPT (("gdb: Target exception CONTROL_BREAK at 0x%08lx\n",
+ (DWORD) current_event.u.Exception.ExceptionRecord.ExceptionAddress));
+ ourstatus->value.sig = TARGET_SIGNAL_INT;
+ last_sig = SIGINT; /* FIXME - should check pass state */
+ break;
case EXCEPTION_SINGLE_STEP:
DEBUG_EXCEPT (("gdb: Target exception SINGLE_STEP at 0x%08lx\n",
(DWORD) current_event.u.Exception.ExceptionRecord.ExceptionAddress));
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [RFA] Add handling of Ctrl-Break for win32 native target.
2002-02-04 7:05 [RFA] Add handling of Ctrl-Break for win32 native target Pierre Muller
@ 2002-02-04 7:09 ` Eli Zaretskii
2002-02-04 7:20 ` Pierre Muller
2002-02-04 8:52 ` Christopher Faylor
1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2002-02-04 7:09 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
On Mon, 4 Feb 2002, Pierre Muller wrote:
> Ctrl-Break exception is not handled by
> current win32-nat.c code.
>
> The following patch fixes this.
IMHO, this should be mentioned in the manual somewhere (as a
Windows-specific issue).
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] Add handling of Ctrl-Break for win32 native target.
2002-02-04 7:09 ` Eli Zaretskii
@ 2002-02-04 7:20 ` Pierre Muller
2002-02-04 8:58 ` Christopher Faylor
2002-02-04 8:59 ` Eli Zaretskii
0 siblings, 2 replies; 9+ messages in thread
From: Pierre Muller @ 2002-02-04 7:20 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches
At 16:08 04/02/2002 , Eli Zaretskii a écrit:
>On Mon, 4 Feb 2002, Pierre Muller wrote:
>
> > Ctrl-Break exception is not handled by
> > current win32-nat.c code.
> >
> > The following patch fixes this.
>
>IMHO, this should be mentioned in the manual somewhere (as a
>Windows-specific issue).
I don't undersantd what you mean here:
should we document this as a known limitation of the win32 native target up to 5.1.1
or should we specify that Ctrl-Break gets also caught in newer versions of GDB?
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] Add handling of Ctrl-Break for win32 native target.
2002-02-04 7:20 ` Pierre Muller
@ 2002-02-04 8:58 ` Christopher Faylor
2002-02-04 8:59 ` Eli Zaretskii
1 sibling, 0 replies; 9+ messages in thread
From: Christopher Faylor @ 2002-02-04 8:58 UTC (permalink / raw)
To: gdb-patches
On Mon, Feb 04, 2002 at 04:19:29PM +0100, Pierre Muller wrote:
>At 16:08 04/02/2002 , Eli Zaretskii a ?crit:
>
>>On Mon, 4 Feb 2002, Pierre Muller wrote:
>>
>> > Ctrl-Break exception is not handled by
>> > current win32-nat.c code.
>> >
>> > The following patch fixes this.
>>
>>IMHO, this should be mentioned in the manual somewhere (as a
>>Windows-specific issue).
>
> I don't undersantd what you mean here:
>
>should we document this as a known limitation of the win32 native
>target up to 5.1.1 or should we specify that Ctrl-Break gets also
>caught in newer versions of GDB?
I think we should document that Ctrl-Break does the same thing as
CTRL-C.
Actually, some people seem to think that CTRL-BREAK should send
something like a SIGQUIT. That's not the way it works in Cygwin,
though, so the new behavior is correct.
cgf
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] Add handling of Ctrl-Break for win32 native target.
2002-02-04 7:20 ` Pierre Muller
2002-02-04 8:58 ` Christopher Faylor
@ 2002-02-04 8:59 ` Eli Zaretskii
1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2002-02-04 8:59 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
On Mon, 4 Feb 2002, Pierre Muller wrote:
> >IMHO, this should be mentioned in the manual somewhere (as a
> >Windows-specific issue).
>
> I don't undersantd what you mean here:
>
> should we document this as a known limitation of the win32 native target up to 5.1.1
> or should we specify that Ctrl-Break gets also caught in newer versions of GDB?
The latter.
What I understood from the patch is that Ctrl-Break is not only caught,
but is handled differently from other exceptions. If that is true, I
think the users should know what will they see if they press Ctrl-Break.
If I misunderstood, I apologize for the line noise.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] Add handling of Ctrl-Break for win32 native target.
2002-02-04 7:05 [RFA] Add handling of Ctrl-Break for win32 native target Pierre Muller
2002-02-04 7:09 ` Eli Zaretskii
@ 2002-02-04 8:52 ` Christopher Faylor
2002-02-04 9:41 ` Pierre Muller
1 sibling, 1 reply; 9+ messages in thread
From: Christopher Faylor @ 2002-02-04 8:52 UTC (permalink / raw)
To: gdb-patches
On Mon, Feb 04, 2002 at 04:04:47PM +0100, Pierre Muller wrote:
>2002-02-04 Pierre Muller <muller@ics.u-strasbg.fr>
> win32-nat.c (handle_exception): Handle Ctrl-Break exception.
>
Looks good. Please check it in.
I'm looking forward to the patch to handle the pass state.
cgf
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] Add handling of Ctrl-Break for win32 native target.
2002-02-04 8:52 ` Christopher Faylor
@ 2002-02-04 9:41 ` Pierre Muller
2002-02-04 12:54 ` Christopher Faylor
0 siblings, 1 reply; 9+ messages in thread
From: Pierre Muller @ 2002-02-04 9:41 UTC (permalink / raw)
To: gdb-patches
At 17:52 04/02/2002 , vous avez écrit:
>On Mon, Feb 04, 2002 at 04:04:47PM +0100, Pierre Muller wrote:
> >2002-02-04 Pierre Muller <muller@ics.u-strasbg.fr>
> > win32-nat.c (handle_exception): Handle Ctrl-Break exception.
> >
>
>Looks good. Please check it in.
I tried, but I can't get the lock for /cvs/src/src/gdb
cvs server: [09:25:31] waiting for muller's lock in /cvs/src/src/gdb
cvs server: [09:26:01] waiting for muller's lock in /cvs/src/src/gdb
I am not sure that I understand this message correctly:
I am waiting until I can get a lock for muller (i.e. myself)
or is there some zombie processs somewhere on the cvs server?
>I'm looking forward to the patch to handle the pass state.
The main problem is that this will only partially work because of a known bug
in the win32 API:
Extracted from
http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0898/bugslayer0898.htm&nav=/msj/0898/newnav.htm
There are a couple of issues to remember when using SetUnhandledExceptionFilter.
The first is that any exception filter that you set cannot be debugged. This is a known bug.
Knowledge Base article Q173652 says that under a debugger the process wide filter is not called.
This can be a bit of a pain, but in a C++ program you can just use your function in a regular SEH exception
filter to debug it. If you look at the CH_TEST.CPP test program, which is part of this month's source code
(Aug98Bugslayer.exe ), this is exactly what I did to debug it.
An alternative is to use a kernel debugger like WinDBG to get around this limitation.
But I don't really know if Cygwin library uses SetUnhandledExceptionFilter
(I suspect it does as my patch does not work as intended...).
I will send a [RFC] when all seems ready, even if it does not fully work...
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] Add handling of Ctrl-Break for win32 native target.
2002-02-04 9:41 ` Pierre Muller
@ 2002-02-04 12:54 ` Christopher Faylor
2002-02-05 4:49 ` Pierre Muller
0 siblings, 1 reply; 9+ messages in thread
From: Christopher Faylor @ 2002-02-04 12:54 UTC (permalink / raw)
To: gdb-patches
On Mon, Feb 04, 2002 at 06:40:09PM +0100, Pierre Muller wrote:
>At 17:52 04/02/2002 , vous avez ?crit:
>>On Mon, Feb 04, 2002 at 04:04:47PM +0100, Pierre Muller wrote:
>>>2002-02-04 Pierre Muller <muller@ics.u-strasbg.fr>
>>> win32-nat.c (handle_exception): Handle Ctrl-Break exception.
>>
>>Looks good. Please check it in.
>
>I tried, but I can't get the lock for /cvs/src/src/gdb
>cvs server: [09:25:31] waiting for muller's lock in /cvs/src/src/gdb
>cvs server: [09:26:01] waiting for muller's lock in /cvs/src/src/gdb
This should be fixed now. sourceware does an automatic flush of invalid
lock files every half hour.
cgf
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [RFA] Add handling of Ctrl-Break for win32 native target.
2002-02-04 12:54 ` Christopher Faylor
@ 2002-02-05 4:49 ` Pierre Muller
0 siblings, 0 replies; 9+ messages in thread
From: Pierre Muller @ 2002-02-05 4:49 UTC (permalink / raw)
To: gdb-patches
At 21:54 04/02/2002 , vous avez écrit:
>On Mon, Feb 04, 2002 at 06:40:09PM +0100, Pierre Muller wrote:
> >At 17:52 04/02/2002 , vous avez ?crit:
> >>On Mon, Feb 04, 2002 at 04:04:47PM +0100, Pierre Muller wrote:
> >>>2002-02-04 Pierre Muller <muller@ics.u-strasbg.fr>
> >>> win32-nat.c (handle_exception): Handle Ctrl-Break exception.
> >>
> >>Looks good. Please check it in.
> >
> >I tried, but I can't get the lock for /cvs/src/src/gdb
> >cvs server: [09:25:31] waiting for muller's lock in /cvs/src/src/gdb
> >cvs server: [09:26:01] waiting for muller's lock in /cvs/src/src/gdb
>
>This should be fixed now. sourceware does an automatic flush of invalid
>lock files every half hour.
Checked in. Thanks.
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-02-05 12:49 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-04 7:05 [RFA] Add handling of Ctrl-Break for win32 native target Pierre Muller
2002-02-04 7:09 ` Eli Zaretskii
2002-02-04 7:20 ` Pierre Muller
2002-02-04 8:58 ` Christopher Faylor
2002-02-04 8:59 ` Eli Zaretskii
2002-02-04 8:52 ` Christopher Faylor
2002-02-04 9:41 ` Pierre Muller
2002-02-04 12:54 ` Christopher Faylor
2002-02-05 4:49 ` Pierre Muller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox