From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id YOIAC+gw+V+0QgAAWB0awg (envelope-from ) for ; Fri, 08 Jan 2021 23:28:24 -0500 Received: by simark.ca (Postfix, from userid 112) id 117531EE17; Fri, 8 Jan 2021 23:28:24 -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 94D471E4F4 for ; Fri, 8 Jan 2021 23:28:23 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D74EC3985472; Sat, 9 Jan 2021 04:28:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D74EC3985472 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610166502; bh=7dT4M11SG3kjgcj9f7/2fTuYdYdSEykZqs14h3T2naM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Ya/Hel5ssStx/iLlluf8YA2wfjrxbKeMpVI+S80vXeVsP9QlrPFZ8OwQ4QdpMv4an 51IOd0fwDLrMr6RoBNbp1Zo1HZMyHFzWQpatrY/gnH4ayD1UpRVK4ku0M7baUTlgTQ Lkao0WHgmIC2X9xZWt1LOtjaMH1dh0oUaHVSPQqA= Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 67842385800B for ; Sat, 9 Jan 2021 04:28:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 67842385800B X-ASG-Debug-ID: 1610166498-0c856e6cd5661ae0001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id CBMCY2eLNIcvGZod (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 08 Jan 2021 23:28:18 -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 2DD0B441D65; Fri, 8 Jan 2021 23:28:18 -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: [PATCH 4/5] gdb: convert solib-aix to new-style debug macros Date: Fri, 8 Jan 2021 23:28:15 -0500 X-ASG-Orig-Subj: [PATCH 4/5] gdb: convert solib-aix to new-style debug macros Message-Id: <20210109042816.4140840-4-simon.marchi@polymtl.ca> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210109042816.4140840-1-simon.marchi@polymtl.ca> References: <20210109042816.4140840-1-simon.marchi@polymtl.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1610166498 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: 2102 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.87110 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" This is only compile-tested. gdb/ChangeLog: * solib-aix.c (solib_aix_debug_printf): New, use throughout file. Change-Id: I7ec4baa15ab5b8ad786212b8b9de61c2c447bac1 --- gdb/solib-aix.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/gdb/solib-aix.c b/gdb/solib-aix.c index 92a3345b06e2..a0dbdde4d49b 100644 --- a/gdb/solib-aix.c +++ b/gdb/solib-aix.c @@ -32,6 +32,11 @@ this module. */ static bool solib_aix_debug; +/* Print an "aix-solib" debug statement. */ + +#define solib_aix_debug_printf(fmt, ...) \ + debug_prefixed_printf_cond (solib_aix_debug, "aix-solib",fmt, ##__VA_ARGS__) + /* Our private data in struct so_list. */ struct lm_info_aix : public lm_info_base @@ -250,10 +255,8 @@ solib_aix_get_library_list (struct inferior *inf, const char *warning_msg) return data->library_list; } - if (solib_aix_debug) - fprintf_unfiltered (gdb_stdlog, - "DEBUG: TARGET_OBJECT_LIBRARIES_AIX = \n%s\n", - library_document->data ()); + solib_aix_debug_printf ("TARGET_OBJECT_LIBRARIES_AIX = %s", + library_document->data ()); data->library_list = solib_aix_parse_libraries (library_document->data ()); if (!data->library_list.has_value () && warning_msg != NULL) @@ -374,9 +377,7 @@ solib_aix_free_so (struct so_list *so) { lm_info_aix *li = (lm_info_aix *) so->lm_info; - if (solib_aix_debug) - fprintf_unfiltered (gdb_stdlog, "DEBUG: solib_aix_free_so (%s)\n", - so->so_name); + solib_aix_debug_printf ("%s", so->so_name); delete li; } @@ -685,11 +686,9 @@ solib_aix_get_toc_value (CORE_ADDR pc) result = (obj_section_addr (data_osect) + xcoff_get_toc_offset (pc_osect->objfile)); - if (solib_aix_debug) - fprintf_unfiltered (gdb_stdlog, - "DEBUG: solib_aix_get_toc_value (pc=%s) -> %s\n", - core_addr_to_string (pc), - core_addr_to_string (result)); + + solib_aix_debug_printf ("pc=%s -> %s", core_addr_to_string (pc), + core_addr_to_string (result)); return result; } -- 2.29.2