From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CFskGXkn/1/6fwAAWB0awg (envelope-from ) for ; Wed, 13 Jan 2021 12:01:45 -0500 Received: by simark.ca (Postfix, from userid 112) id 650FD1EF80; Wed, 13 Jan 2021 12:01:45 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 182BE1EF78 for ; Wed, 13 Jan 2021 12:01:45 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 97D073938C2D; Wed, 13 Jan 2021 17:01:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 97D073938C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610557304; bh=NgiKOh6TA0WeY+sh4RGj5F/f6o6pH2HR79FGCs0c4jM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Dg8Ffg89aCan5qLeOcYyHCSTX0V/YQuqL1Rvb+O5Sltvc8koGniq2jlDEEYWyK1Ok Ex4MCFDIKkTAjPKpdpHNitrGFadRjP7WCycDfB21DAi+FfeOK7srBvN8wm1H5JrpPM N1GMvMFqh+NCCPZIY+I1Q3y63hAy7OSJJvWBjws0= Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 829953938C3F for ; Wed, 13 Jan 2021 17:01:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 829953938C3F X-ASG-Debug-ID: 1610557291-0c856e67e2402500001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id G3cXzhWpZRkoLzKe (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 13 Jan 2021 12:01:31 -0500 (EST) X-Barracuda-Envelope-From: simon.marchi@polymtl.ca X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from simark.localdomain (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) by smtp.ebox.ca (Postfix) with ESMTP id B5EE1441B21; Wed, 13 Jan 2021 12:01:31 -0500 (EST) X-Barracuda-RBL-IP: 192.222.157.6 X-Barracuda-Effective-Source-IP: 192-222-157-6.qc.cable.ebox.net[192.222.157.6] X-Barracuda-Apparent-Source-IP: 192.222.157.6 To: gdb-patches@sourceware.org Subject: [pushed] gdb: bool-ify users of file_is_auto_load_safe Date: Wed, 13 Jan 2021 12:01:31 -0500 X-ASG-Orig-Subj: [pushed] gdb: bool-ify users of file_is_auto_load_safe Message-Id: <20210113170131.1422268-1-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1610557291 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 2367 X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.87218 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" A previous patch missed those. gdb/ChangeLog: * auto-load.c (auto_load_objfile_script_1): Use bool. (execute_script_contents): Use bool. Change-Id: I214bf7ed25af36ced375eb3ec5a403ded2fa572e --- gdb/ChangeLog | 5 +++++ gdb/auto-load.c | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e9f7982cf00a..58392b25cd9f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2021-01-13 Simon Marchi + + * auto-load.c (auto_load_objfile_script_1): Use bool. + (execute_script_contents): Use bool. + 2021-01-13 Simon Marchi * auto-load.h (auto_load_gdb_scripts_enabled): Return bool, move diff --git a/gdb/auto-load.c b/gdb/auto-load.c index 0d5532b4882e..b6cb79af34eb 100644 --- a/gdb/auto-load.c +++ b/gdb/auto-load.c @@ -808,10 +808,9 @@ auto_load_objfile_script_1 (struct objfile *objfile, const char *realname, if (input) { - int is_safe; struct auto_load_pspace_info *pspace_info; - is_safe + bool is_safe = file_is_auto_load_safe (debugfile, _("auto-load: Loading %s script \"%s\"" " by extension for objfile \"%s\".\n"), @@ -968,7 +967,7 @@ execute_script_contents (struct auto_load_pspace_info *pspace_info, objfile_script_executor_func *executor; const char *newline, *script_text; const char *name; - int is_safe, in_hash_table; + int in_hash_table; /* The first line of the script is the name of the script. It must not contain any kind of space character. */ @@ -1022,12 +1021,13 @@ of file %ps."), return; } - is_safe = file_is_auto_load_safe (objfile_name (objfile), - _("auto-load: Loading %s script " - "\"%s\" from section \"%s\" of " - "objfile \"%s\".\n"), - ext_lang_name (language), name, - section_name, objfile_name (objfile)); + bool is_safe + = file_is_auto_load_safe (objfile_name (objfile), + _("auto-load: Loading %s script " + "\"%s\" from section \"%s\" of " + "objfile \"%s\".\n"), + ext_lang_name (language), name, + section_name, objfile_name (objfile)); in_hash_table = maybe_add_script_text (pspace_info, is_safe, name, language); -- 2.29.2