From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by sourceware.org (Postfix) with ESMTPS id D4584383E827 for ; Mon, 29 Jun 2020 12:06:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D4584383E827 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=alves.ped@gmail.com Received: by mail-wr1-f48.google.com with SMTP id b6so16259441wrs.11 for ; Mon, 29 Jun 2020 05:06:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=LiiXeyumkjvaeNEnALpknUM3+R8M+o0yjwdjG7SvaT0=; b=fNoYQH4Az49mJoYIanvFxMapm2dB/YrHaVzpLY4A3xW5a/S4BNRhiYf7HlpPMgeysN EBMCJs8GBptiC80G1Y/B74ZzIvtvyLJZhGedZFfxGfizfsxqUhX5M/x/uaVXt5sjHBRb ZXqaVVdiGNYSU06Lt8BxF1dFIwCG1vKIkZiMHkeLxlPU1DCrZSzjLU+H+wvzfdJ7kbxv xxiJ/ibZ/iIC1XIIDrCUXKTu3rtB2h3/MaZ8GOZeHv7isqWXTRQi1zBu4yUc5755bvZV jjVajWN+66rBQYTzwDYKQkq8CCFPCTbPHaFeDOW1ifEoTI+Bwo7DQN/Cbu64edloPbjP Yxbw== X-Gm-Message-State: AOAM530oYsiUaVbhKEFiOHyIqkTMj95mMrOZSTUpg60xRoPI857qU+4t jAtgZQ/IGon+Hbuoq0v7eSZw5ncWklVUow== X-Google-Smtp-Source: ABdhPJxYiNMIF/NMd6IH9T7XwNNRGHVz01II8tx4S1hhtJnguvFAQ3roXxaL/Ix/ZL2Pc/HT4uBrAg== X-Received: by 2002:adf:aad7:: with SMTP id i23mr16870079wrc.331.1593432389009; Mon, 29 Jun 2020 05:06:29 -0700 (PDT) Received: from ?IPv6:2001:8a0:f922:c400:56ee:75ff:fe8d:232b? ([2001:8a0:f922:c400:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id w2sm39496346wrs.77.2020.06.29.05.06.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Jun 2020 05:06:27 -0700 (PDT) Subject: Re: [RFA] Fine tune exec-file-mismatch help and documentation. To: Philippe Waroquiers , gdb-patches@sourceware.org References: <20200627201243.21594-1-philippe.waroquiers@skynet.be> From: Pedro Alves Message-ID: <9785021a-87d7-da7d-d426-0bb91e2a1b30@palves.net> Date: Mon, 29 Jun 2020 13:06:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20200627201243.21594-1-philippe.waroquiers@skynet.be> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 12:06:32 -0000 On 6/27/20 9:12 PM, Philippe Waroquiers via Gdb-patches wrote: > It was deemed better to explicitly mention in help and doc that build IDs > are used for comparison, and that symbols are loaded when asking to > load the exec-file. > > gdb/ChangeLog > 2020-06-27 Philippe Waroquiers > > * exec.c (_initialize_exec): Update exec-file-mismatch help. > > gdb/doc/ChangeLog > 2020-06-27 Philippe Waroquiers > > * gdb.texinfo (Attach): Updte exec-file-mismatch doc. Typo: Updte -> Update > --- > gdb/doc/gdb.texinfo | 2 ++ > gdb/exec.c | 8 ++++++-- > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo > index fbe9f850af..142684b694 100644 > --- a/gdb/doc/gdb.texinfo > +++ b/gdb/doc/gdb.texinfo > @@ -3016,6 +3016,8 @@ by @value{GDBN} and the executable file used to start the process. If > @samp{ask}, the default, display a warning and ask the user whether to > load the process executable file; if @samp{warn}, just display a > warning; if @samp{off}, don't attempt to detect a mismatch. > +If the user asks to load the process ececutable file, then its symbols > +will be loaded as well. Typo: ececutable -> executable Hmm, isn't "ask" being used for both the "GDB asks the user" and "user confirms after being asked by GDB" a little confusing? Would "If the user confirms loading the " instead sound OK? > > @cindex show exec-file-mismatch > @item show exec-file-mismatch > diff --git a/gdb/exec.c b/gdb/exec.c > index de473fbcb2..84e75e0798 100644 > --- a/gdb/exec.c > +++ b/gdb/exec.c > @@ -305,7 +305,7 @@ validate_exec_file (int from_tty) > exec_file_target = TARGET_SYSROOT_PREFIX + exec_file_target; > > warning > - (_("Mismatch between current exec-file %ps\n" > + (_("Build ID mismatch between current exec-file %ps\n" > "and automatically determined exec-file %ps\n" > "exec-file-mismatch handling is currently \"%s\""), > styled_string (file_name_style.style (), current_exec_file), > @@ -1269,7 +1269,11 @@ loaded by GDB and the exec-file automatically determined when attaching\n\ > to a process:\n\n\ > ask - warn the user and ask whether to load the determined exec-file.\n\ > warn - warn the user, but do not change the exec-file.\n\ > - off - do not check for mismatch."), > + off - do not check for mismatch.\n\ > +\n\ > +GDB detects a mismatch by comparing the build IDs of the files.\n\ > +If the user asks to load the determined exec-file, then its symbols\n\ > +will be loaded as well."), Ditto here.