From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14795 invoked by alias); 11 Jan 2020 18:11:14 -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 14783 invoked by uid 89); 11 Jan 2020 18:11:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=UD:be, H*F:D*be, HX-Languages-Length:1547, HContent-Transfer-Encoding:8bit X-HELO: mailsec113.isp.belgacom.be Received: from mailsec113.isp.belgacom.be (HELO mailsec113.isp.belgacom.be) (195.238.20.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 11 Jan 2020 18:11:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1578766270; x=1610302270; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=TxsBUCyx/bA3ITrwRcW/4ajiNaOMak7GkLYSp0qkhuE=; b=zhQFj2PY7clVLIJOiS0OdIIXm+UPxv6QxPFVeyuO4o4lZhCmRIU/+8tw dFOY1nL0XHLBvl0etSsCm7xjYJZIVQ==; IronPort-SDR: PtcZp76DYI6rGC4tjKqbA5wfmbb94u+o3VSbHqoBOKWXu5mQnGVXakkqioj8e1MWAoKZmw62cy +IDpMyg6nb+mCcKlsf8TbGSzkgu5bLqPvr886ouuJYeYSUGSVN/enCKtIuba3n4ty2m1mUpiY4 ygddyvScXzyGxmMMVUxBDaM/i1nJSWVTmgORYphhkFJ0mV3vZK1tXo0woqso/1OmR7AEyPPBYB LlB9nE2RlAZo0SQjN17gjhjMInMe4vokXmER4FGDumGuiRYEKOtjL5u3nqGz+2scI4+OGvoJrY /0c= Received: from 156.47-242-81.adsl-dyn.isp.belgacom.be (HELO md.home) ([81.242.47.156]) by relay.skynet.be with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 11 Jan 2020 19:10:46 +0100 From: Philippe Waroquiers To: gdb-patches@sourceware.org Subject: [RFAv2 0/3] New option 'set exec-file-mismatch (ask|warn|off)'. Fixes PR gdb/17626. Date: Sat, 11 Jan 2020 18:11:00 -0000 Message-Id: <20200111181041.7163-1-philippe.waroquiers@skynet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg00290.txt.bz2 New option 'set exec-file-mismatch (ask|warn|off)'. Fixes PR gdb/17626. This option allows to tell GDB to detect and possibly handle mismatched exec-files. A recurrent problem with GDB is that GDB uses the wrong exec-file when using the attach/detach commands successively. Also, in case the user specifies a file on the command line but attaches to the wrong PID, this error is not made visible and gives a not user understandable behaviour. RFA 1/3 Implement 'set/show exec-file-mismatch'. implements the option. RFA 2/2 modifies gdb.base/attach.exp to test the option. RFA 3/3 documents the option in NEWS and in gdb.texinfo This is the second version of the RFA. This version handles the comments of Eli about the documentation. As discussed, the option values have been changed to 'ask|warn|off' (ask was previouly reload). Some early comments were given by Tom on the RFC. Some feedback related to these comments: * I have styled the warning/error messages mentionning files in exec.c * Related to new lines in the warning message: many other warning messages have new lines. I have kept them, as it looks to me that the message is more clear like that. Of course, I can remove them if deemed better without. * What happens if the inferior execs another program ? This option only controls the behaviour when attaching to a running program. The behaviour of 'exec' is not changed: GDB already properly determines the executable to use after exec.