Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Corinna Vinschen <vinschen@redhat.com>
To: gdb-patches@sourceware.org
Subject: Re: [RFA] win32-nat.c: Simplify generation of Windows environment
Date: Fri, 08 Dec 2006 09:12:00 -0000	[thread overview]
Message-ID: <20061208091241.GC9829@calimero.vinschen.de> (raw)
In-Reply-To: <upsauvo6f.fsf@gnu.org>

On Dec  8 09:31, Eli Zaretskii wrote:
> > Cc: gdb-patches@sourceware.org
> > From: Jim Blandy <jimb@codesourcery.com>
> > Date: Thu, 07 Dec 2006 16:10:14 -0800
> > 
> > $ cd gdb/config
> > $ grep -nH -e win32-nat */*.m? 
> > i386/cygwin.mh:2:NATDEPFILES= i386-nat.o win32-nat.o corelow.o
> > $ 
> > 
> > I think that means it's just Cygwin.
> 
> No, it just means that the native W32 build is currently not part of
> the CVS.

How exactly are we supposed to think of and support code which is not
part of the source tree when creating a patch?

> A large portion of win32-nat.c is relevant to any native Windows
> debugger.  By contrast, cygwin_internal is obviously Cygwin-specific.
> So I think it would be a good practice to mark such specific portions
> of code explicitly.

As I just wrote in my reply to Jim, the cygwin_internal API is used in
GDB for a long time, as a grep will show.  If win32-nat.c is used by
some not-in-the-source-tree code somewere, it will already have to deal
with cygwin_internal.  A patch for a native GDB will have created either
a matching #define or a substitute for this function anyway.  I don't
see how this new usage differs from the existing ones.

Talking of a native win32 GDB, it shouldn't be bothered at all by my
patch.  Creating a native Windows environment from Cygwin's environment
is not a concern natively.  Just setting it to NULL in the call to
CreateProcess is sufficient for a native GDB, since that will create a
copy of the parent's (GDB's) environment to the child, the same what the
longish code does, which I substituted with cygwin_internal(CW_SYN_WINENV).


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat


  reply	other threads:[~2006-12-08  9:12 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 [this message]
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
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=20061208091241.GC9829@calimero.vinschen.de \
    --to=vinschen@redhat.com \
    --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