Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pedro Alves" <pedro_alves@portugalmail.pt>
To: "Pierre Muller" <muller@ics.u-strasbg.fr>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] gdb/win32-nat.c: do not call CloseHandle on process and thread handles
Date: Thu, 22 Nov 2007 12:56:00 -0000	[thread overview]
Message-ID: <4053daab0711220456q46cca9b4m3714c35bcc805518@mail.gmail.com> (raw)
In-Reply-To: <002801c82d06$21bdf510$6539df30$@u-strasbg.fr>

Hi Pierre,

Pierre Muller wrote:
>   Following the discussion
> http://sourceware.org/ml/gdb/2007-10/msg00131.html
> and
> http://sourceware.org/ml/gdb-patches/2007-10/msg00502.html
>
>   I resubmit a part of my original patch that only contains the
> removal of all calls to the win32 API CloseHandle
> with thread or process handles.
>

You'll still have to somehow close this process handle (current_process_handle):

/* Called in pathological case where Windows fails to send a
   CREATE_PROCESS_DEBUG_EVENT after an attach.  */
static DWORD
fake_create_process (void)
{
  current_process_handle = OpenProcess (PROCESS_ALL_ACCESS, FALSE,
                                        current_event.dwProcessId);
  main_thread_id = current_event.dwThreadId;
  current_thread = win32_add_thread (main_thread_id,
                                     current_event.u.CreateThread.hThread);
  return main_thread_id;
}

-- 
Pedro Alves


  reply	other threads:[~2007-11-22 12:56 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 [this message]
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         ` [RFA] " Pedro Alves

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=4053daab0711220456q46cca9b4m3714c35bcc805518@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