Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Christopher Faylor <cgf-use-the-mailinglist-please@sourceware.org>
To: gdb-patches@sourceware.org
Subject: Re: [RFA] win32-nat.c: Simplify generation of Windows environment
Date: Fri, 08 Dec 2006 20:43:00 -0000	[thread overview]
Message-ID: <20061208204340.GA18363@trixie.casa.cgf.cx> (raw)
In-Reply-To: <uodqfcrr5.fsf@gnu.org>

Sorry for the delay in responding.  I'm on a business trip this week.

On Thu, Dec 07, 2006 at 11:37:02PM +0200, Eli Zaretskii wrote:
>> Date: Thu, 7 Dec 2006 10:58:39 +0100
>> From: Corinna Vinschen <vinschen@redhat.com>
>> 
>> the below patch simplifies the code which translates the Cygwin
>> environment into the native Windows environment.  So far this is
>> done in GDB manually.  However, there's a Cygwin specific function
>> call which does the same for the calling process.  Using this call
>> has three advantages.
>
>Is win32-nat.c used only for the Cygwin build?  I thought the native
>Windows build used it as well (perhaps with a few patches that are not
>yet part of the CVS), but maybe I was mistaken.
>
>If I am right, then please make this change, and especially the call
>to cygwin_internal, conditioned on __CYGWIN__, or some other
>Cygwin-specific symbol.

There is no need for an ifdef.

  % grep -C 2 cygwin_internal win32-nat.c
      {
	/* Try fall back to Cygwin pid */
	pid = cygwin_internal (CW_CYGWIN_PID_TO_WINPID, pid);

	if (pid > 0)
  --
    struct external_pinfo *pinfo;

    cygwin_internal (CW_LOCK_PINFO, 1000);
    for (cpid = 0;
	 (pinfo = (struct external_pinfo *)
	  cygwin_internal (CW_GETPINFO, cpid | CW_NEXTPID));
	 cpid = pinfo->pid)
      {
  --
	 }
      }
    cygwin_internal (CW_UNLOCK_PINFO);
    return path_ptr;
  }

Corinna, please go ahead and check in your patch.

cgf


  parent reply	other threads:[~2006-12-08 20:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07  9:58 Corinna Vinschen
2006-12-07 16:35 ` Corinna Vinschen
2006-12-07 19:48 ` Jim Blandy
2006-12-08  8:57   ` Corinna Vinschen
2006-12-07 21:37 ` Eli Zaretskii
2006-12-08  0:09   ` Jim Blandy
2006-12-08  7:31     ` Eli Zaretskii
2006-12-08  9:12       ` Corinna Vinschen
2006-12-08 11:31         ` Eli Zaretskii
2006-12-08 12:05           ` Corinna Vinschen
2006-12-09  8:01       ` Jim Blandy
2006-12-08 20:43   ` Christopher Faylor [this message]
2006-12-09  9:15     ` Corinna Vinschen

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=20061208204340.GA18363@trixie.casa.cgf.cx \
    --to=cgf-use-the-mailinglist-please@sourceware.org \
    --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