From: "Pedro Alves" <pedro_alves@portugalmail.pt>
To: "Pierre Muller" <muller@ics.u-strasbg.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] win32-nat.c: Handle EXCEPTION_INVALID_HANDLE as SIGSYS
Date: Wed, 24 Oct 2007 08:51:00 -0000 [thread overview]
Message-ID: <4053daab0710240139o1898369jc54fbb75c6c48cef@mail.gmail.com> (raw)
In-Reply-To: <001301c81613$d5492730$7fdb7590$@u-strasbg.fr>
Pierre Muller wrote:
>
> If I cut my patch into three parts:
> 3) Remove wrong CloseHandle calls
I'd prefer if this went in first. I'm convinced this is the correct
thing to do everywhere.
(Hey, I'm happy in that allows me to remove an ugly #ifdef in
gdbserver/win32-low.c.)
( ( ( If it isn't [the correct thing to do everywhere], then we can
follow Cygwin's lead, and
install a top level SEH handler in gdb that handles this exception.
It could have
always have been done in gdb the first place, even for Cygwin. Remember, the
exception is only thrown iff a debugger is attached, and a debugger
can easilly not
pass it to the inferior. That would mean 0 changes to win32-nat.c debug API
usage. Of course, any other inferior that throws that exception will have
the same problem. ) ) )
> 1) Handle EXCEPTION_INVALID_HANDLE exception as a SIGSYS target signal
> 2) Add the stoponinvalidhandle
EXCEPTION_INVALID_HANDLE is not quite a SIGSYS. Plus, a Cygwin inferior should
never see this, as you shouldn't be using CloseHandle in user apps there anyway.
Maybe we can take the oportunity to implement more generic Windows exceptions
support, not just EXCEPTION_INVALID_HANDLE. Something similar to the "handle"
command.
>
> then, after the 1) is applied,
> you will get several SIGSYS when debugging gdb with itself.
> I suppose that this would introduce lots of
> new failures to the testsuite, especially in the gdb.gdb subdirectory.
>
Only on MinGW gdb, so they wouldn't qualify as "new" failures. And only on
tests that load gdb in gdb, or that have a `close' with a broken argument.
> I would really prefer to keep trace of
> the old CloseHandles, in case we discover that under special
> circumstances, or for some versions of the system,
> these calls are needed.
>
I'd prefer we don't add such ugliness.
Cheers,
Pedro Alves
next prev parent reply other threads:[~2007-10-24 8:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-22 14:14 Pierre Muller
2007-10-22 21:15 ` Eli Zaretskii
2007-10-23 22:06 ` Christopher Faylor
2007-10-23 22:26 ` Daniel Jacobowitz
2007-10-24 5:21 ` Eli Zaretskii
2007-10-24 8:40 ` Pierre Muller
2007-10-24 19:07 ` Eli Zaretskii
2007-10-24 11:47 ` Pedro Alves
2007-10-24 8:13 ` Pierre Muller
2007-10-24 8:51 ` Pedro Alves [this message]
2007-10-24 19:19 ` Eli Zaretskii
2007-10-24 19:37 ` Mark Kettenis
2007-10-24 19:40 ` Daniel Jacobowitz
2007-10-24 20:15 ` Eli Zaretskii
2007-10-29 8:25 ` Christopher Faylor
2007-10-29 3:07 ` 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=4053daab0710240139o1898369jc54fbb75c6c48cef@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