This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: File locking of target executable
- From: Kris Warkentin <kewarken at qnx dot com>
- To: "Gdb at Sources dot Redhat dot Com" <gdb at sources dot redhat dot com>
- Date: Tue, 02 Mar 2004 15:41:24 -0500
- Subject: Re: File locking of target executable
- References: <4044F049.6060009@qnx.com>
Argh. I always see the answer AFTER I mail to the mailing list. Looks
like Windows itself won't let a binary be removed if it's executing.
The problem report states that this is happening in the remote case but
I just checked and it doesn't seem to be. Must be an error in the bug
report.
cheers,
Kris
Kris Warkentin wrote:
I've observed (on Windows at least) that when I'm debugging an
executable, I can't delete it. Just having it the executable loaded
in gdb is insufficient; it actually has to be running. I didn't see
anything on a casual sniff through the source but perhaps I'm missing
some sort of lock procedure.
This comes up in the context of Eclipse: if you're debugging a project
and try to rebuild, the make fails when it can't unlink the target
app. It looks like under some circumstances gdb might use memory
mapped files...could that be the culprit?
cheers,
Kris