This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
program spaces vs exec
- From: dje at google dot com (Doug Evans)
- To: pedro at codesourcery dot com
- Cc: gdb at sourceware dot org
- Date: Wed, 5 Oct 2011 11:15:26 -0700 (PDT)
- Subject: program spaces vs exec
Hi.
Question: Why does the program space remain unchanged across an exec?
[for reference sake, target = amd64-linux]
Is it just expediency? Or is there a functional reason?
I ask because, for example, registering pretty-printers
with a particular progspace doesn't work as one would expect
in this case. E.g., One needs the pretty-printers from the
previous program to be gone when the new one loads.
This concerns more than just exec of course.
E.g., Any time the "main" objfile is changed (e.g., "file foo") I'd intuitively
expect a new program space.
OTOH, it's entirely possible progspaces need to be looked at differently
for *nix.
For reference sake, from the archives I found this:
http://sourceware.org/ml/gdb-patches/2009-10/msg00110.html