Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: "'Eli Zaretskii'" <eliz@gnu.org>,
	"'Pedro Alves'" <pedro@codesourcery.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: [RFA] testsuite/gdb.base/fullname.exp fix
Date: Sun, 21 Jun 2009 16:45:00 -0000	[thread overview]
Message-ID: <000301c9f28f$aa284220$fe78c660$@u-strasbg.fr> (raw)
In-Reply-To: <E1MINPA-0002yq-8h@fencepost.gnu.org>

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Eli Zaretskii
> Envoyé : Sunday, June 21, 2009 3:48 PM
> À : Pedro Alves
> Cc : gdb-patches@sourceware.org; muller@ics.u-strasbg.fr
> Objet : Re: [RFA] testsuite/gdb.base/fullname.exp fix
> 
> > From: Pedro Alves <pedro@codesourcery.com>
> > Date: Sun, 21 Jun 2009 02:27:47 +0100
> > Cc: "Pierre Muller" <muller@ics.u-strasbg.fr>
> >
> > (I think Cygwin has now some magic to be able
> > to remove open files?  Maybe I'm dreaming.)
> 
> You can do that on Windows (only with NTFS, IIRC), but only if you use
> CreateFile with the right flags to open the file.  Guess what the MS
> runtime does in its emulation of `open', `fopen' and friends.

OK, now I understand:
  bfd seems to use these special flags,
so that after putting a breakpoint on main
you end up with two open handles on the executable
(I found that out by debugging gdb with itself)
and if you issue:
(gdb) shell rm gdb.base/fullname.exe
All works, in the sense that you are able to 
delete the file despite the open handles.
  But the problem is that if you try that:
(gdb) shell echo dummy > gdb.base/fullname.exe
you get:
sh: gdb.base/fullname.exe: Permission denied.

  So when trying to recompile fullname.exe
GNU ld first erases the existing binary (=> success)
and later tries to write the new binary (=> failure).

 What is the use of allowing delete operation and not write operation?

Pierre


  reply	other threads:[~2009-06-21 16:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-19 22:15 Pierre Muller
2009-06-21  1:27 ` Pedro Alves
2009-06-21 13:48   ` Eli Zaretskii
2009-06-21 16:45     ` Pierre Muller [this message]
2009-06-21 23:17       ` Eli Zaretskii
2009-06-25 22:29         ` Pierre Muller
2009-06-27 14:39           ` Eli Zaretskii

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='000301c9f28f$aa284220$fe78c660$@u-strasbg.fr' \
    --to=muller@ics.u-strasbg.fr \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    /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