From: "Pedro Alves" <pedro_alves@portugalmail.pt>
To: gdb-patches@sourceware.org
Subject: Re: [RFA] gdb/win32-nat.c: do not call CloseHandle on process and thread handles
Date: Fri, 23 Nov 2007 16:33:00 -0000 [thread overview]
Message-ID: <4053daab0711230833xa5091e7ue5494b97ce276049@mail.gmail.com> (raw)
In-Reply-To: <20071123011754.GB31180@ednor.casa.cgf.cx>
On Nov 23, 2007 1:17 AM, Christopher Faylor wrote:
> On Thu, Nov 22, 2007 at 02:37:26PM +0000, Pedro Alves wrote:
> >Don't know, you'll have to check, but I doubt it. It just might be
> >easier to always open a handle to the process (OpenProcess), and not
> >touch the one coming on the event. Then you would always close the
> >process handle, because you know you're the one who opened it. OTTOMH,
> >gdbserver does something similar, but leaks. This uses an extra handle
> >on the normal case, but I don't think I'd care, as long as there are no
> >leaks. Otherwise, you'll just have to keep a flag somewhere.
>
> Are you sure that it's always possible for the debugger to open a handle
> to the process? It is a given that there will always be a handle
> available via the debugging interface but I don't know that it is a
> given that a nonprivileged process would necessarily be able to open a
> handle to a privileged process. I think I'd prefer a flag.
>
I'd be surprised if you could be able to debug/run/'attach to' a
process, but not be
able to get a handle to it. Anyhow, FWIW, I'm OK with a flag as well.
--
Pedro Alves
prev parent reply other threads:[~2007-11-23 16:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-22 12:49 Pierre Muller
2007-11-22 12:56 ` Pedro Alves
2007-11-22 13:56 ` Pierre Muller
2007-11-22 14:37 ` Pedro Alves
2007-11-23 1:18 ` Christopher Faylor
2007-11-23 16:21 ` Pierre Muller
2007-11-24 5:44 ` Christopher Faylor
2007-11-26 9:21 ` [RFA 2] " Pierre Muller
2007-12-02 5:46 ` Christopher Faylor
2007-11-23 16:33 ` Pedro Alves [this message]
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=4053daab0711230833xa5091e7ue5494b97ce276049@mail.gmail.com \
--to=pedro_alves@portugalmail.pt \
--cc=gdb-patches@sourceware.org \
/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