From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12559 invoked by alias); 5 Oct 2011 18:15:57 -0000 Received: (qmail 12545 invoked by uid 22791); 5 Oct 2011 18:15:55 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_BJ X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 05 Oct 2011 18:15:39 +0000 Received: from hpaq3.eem.corp.google.com (hpaq3.eem.corp.google.com [172.25.149.3]) by smtp-out.google.com with ESMTP id p95IFTfb001564; Wed, 5 Oct 2011 11:15:29 -0700 Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.18.110.50]) by hpaq3.eem.corp.google.com with ESMTP id p95IFRpG018380; Wed, 5 Oct 2011 11:15:28 -0700 Received: by ruffy.mtv.corp.google.com (Postfix, from userid 67641) id B6CCA2461D1; Wed, 5 Oct 2011 11:15:26 -0700 (PDT) To: pedro@codesourcery.com cc: gdb@sourceware.org Subject: program spaces vs exec Message-Id: <20111005181526.B6CCA2461D1@ruffy.mtv.corp.google.com> Date: Wed, 05 Oct 2011 18:15:00 -0000 From: dje@google.com (Doug Evans) X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00016.txt.bz2 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