From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47606 invoked by alias); 11 May 2015 20:23:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 47596 invoked by uid 89); 11 May 2015 20:23:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-oi0-f50.google.com Received: from mail-oi0-f50.google.com (HELO mail-oi0-f50.google.com) (209.85.218.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 11 May 2015 20:23:04 +0000 Received: by oica37 with SMTP id a37so114099990oic.0 for ; Mon, 11 May 2015 13:23:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=iSgl6X2WqLrjhuIubeAGJTMBhB1lYVfKHmg54mBzeL8=; b=jBgRNVP8nEvTH3IB1W6BV5Tz5Vp04J0g87ckOLVZ7MPCMqqOyZ974Sz2KX5d9MbKOe nj1Qk6Ma+h2Mygdsdszxf8uXsTevBWmDEX+hn46L6rneabL07+AzTZIb8+LbHtErbplj +Rha1yw8AUTITrV3ciy+jLL8/T07DcOJUS4YrjgzieFoBOMNFJY1v/D8ytoto8bhDQPy WAgm8gcvwCBu6PnWf2Ddw12rX58cdC+haQ+IXShddw0KJZ4RNr8W0hjxM4uCBWLBFO/V Mdz5PHbJmI+pwzeZ9Khxu55AB/SLNkq1ug95lXXqBpvw+eBKXETkra11XjOpkUf/N9z0 08Ew== X-Gm-Message-State: ALoCoQkkJqAoBvDVSPMTnXpNUZo8pqBVdepxbo6jPuFoH30MXnr85BxJix0pCznfTaODlumsScXe MIME-Version: 1.0 X-Received: by 10.60.132.208 with SMTP id ow16mr9327884oeb.66.1431375782572; Mon, 11 May 2015 13:23:02 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Mon, 11 May 2015 13:23:02 -0700 (PDT) In-Reply-To: <1430907977-30605-1-git-send-email-gbenson@redhat.com> References: <20150505151448.GA1417@blade.nx> <1430907977-30605-1-git-send-email-gbenson@redhat.com> Date: Mon, 11 May 2015 20:23:00 -0000 Message-ID: Subject: Re: [PATCH] Make only user-specified executable filenames sticky From: Doug Evans To: Gary Benson Cc: gdb-patches , Philippe Waroquiers Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00260.txt.bz2 On Wed, May 6, 2015 at 3:26 AM, Gary Benson wrote: > Hi all, > > In GDB some executable files are supplied by the user (e.g. using a > "file" command) and some are determined by GDB (e.g. while processing > an "attach" command). GDB will not attempt to determine a filename if > one has been set. This causes problems if you attach to one process > and then attach to another: GDB will not attempt to discover the main > executable on the second attach. If the two processes have different > main executable files then the symbols will now be wrong. > > This commit updates GDB to keep track of which executable filenames > were supplied by the user. When GDB might attempt to determine an > executable filename and one is already set, filenames determined by > GDB may be overridden but user-supplied filenames will not. Hi. I can imagine sometimes wanting either behaviour, depending on the situation. E.g., if I supply a file name do some stuff, and then change my mind or wish to investigate a difference process I may wish gdb to automagically pick up the file name of the new process. OTOH other times I may wish to override what gdb would automagically choose and supply my own file name. This suggests having an option to the command to choose the behaviour one wants (I'd hate a global switch for this). This doesn't have to be added today of course. I only bring this up in case a behavioural change is being introduced (it doesn't appear so, but I could be wrong), in which case now is a good time to discuss it. My main reason for sending this message, though, is that I think a notification to the user is warranted here. E.g., something like "Using xyz for the symbol file name, since that's what you specified. If this is wrong, please do [...]." or whatever. Just something so that the user knows gdb is not automagically picking the file.