From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from barracuda.ebox.ca (barracuda.ebox.ca [96.127.255.19]) by sourceware.org (Postfix) with ESMTPS id 920953858D37 for ; Mon, 13 Jul 2020 17:52:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 920953858D37 X-ASG-Debug-ID: 1594662766-0c856e180d44800001-fS2M51 Received: from smtp.ebox.ca (smtp.ebox.ca [96.127.255.82]) by barracuda.ebox.ca with ESMTP id EN6wA1exubrmHmgA (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Jul 2020 13:52:46 -0400 (EDT) X-Barracuda-Envelope-From: simon.marchi@efficios.com X-Barracuda-RBL-Trusted-Forwarder: 96.127.255.82 Received: from smarchi-efficios.internal.efficios.com (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) by smtp.ebox.ca (Postfix) with ESMTP id 6D19B441B21; Mon, 13 Jul 2020 13:52:46 -0400 (EDT) From: Simon Marchi X-Barracuda-RBL-IP: 192.222.181.218 X-Barracuda-Effective-Source-IP: 192-222-181-218.qc.cable.ebox.net[192.222.181.218] X-Barracuda-Apparent-Source-IP: 192.222.181.218 To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH] gdb/testsuite/lib/dwarf.exp: fix addr_size parameter comments Date: Mon, 13 Jul 2020 13:52:45 -0400 X-ASG-Orig-Subj: [PATCH] gdb/testsuite/lib/dwarf.exp: fix addr_size parameter comments Message-Id: <20200713175245.1650045-1-simon.marchi@efficios.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Barracuda-Connect: smtp.ebox.ca[96.127.255.82] X-Barracuda-Start-Time: 1594662766 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://96.127.255.19:443/cgi-mod/mark.cgi X-Barracuda-BRTS-Status: 1 X-Virus-Scanned: by bsmtpd at ebox.ca X-Barracuda-Scan-Msg-Size: 2300 X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=8.0 tests=BSF_RULE7568M X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.83173 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.50 BSF_RULE7568M Custom Rule 7568M X-Spam-Status: No, score=-24.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, 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, 13 Jul 2020 17:52:56 -0000 The comments modified in this patch claim that the addr_size parameters can take the value 32 or 64 (suggesting the value is in bits). In fact, the expected value is in bytes, either 4 or 8. The actual value in the DWARF info is in bytes. And we can see that the default values used (if addr_size == "default") are: if {$_cu_addr_size == "default"} { if {[is_64_target]} { set _cu_addr_size 8 } else { set _cu_addr_size 4 } } gdb/testsuite/ChangeLog: * lib/dwarf.exp (Dwarf::cu, Dwarf::tu, Dwarf::lines): Change valid values in documentation for addr_size to 4 and 8. Change-Id: I4a02dca2bb7992198864e545ef099f020f54ff2f --- gdb/testsuite/lib/dwarf.exp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index a7dbe25fd458..5448f0ff5df6 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -1026,7 +1026,7 @@ namespace eval Dwarf { # default = 0 (32-bit) # version n - DWARF version number to emit # default = 4 - # addr_size n - the size of addresses, 32, 64, or default + # addr_size n - the size of addresses, 4, 8, or default # default = default # fission 0|1 - boolean indicating if generating Fission debug info # default = 0 @@ -1117,7 +1117,7 @@ namespace eval Dwarf { # default = 0 (32-bit) # version n - DWARF version number to emit # default = 4 - # addr_size n - the size of addresses, 32, 64, or default + # addr_size n - the size of addresses, 4, 8, or default # default = default # fission 0|1 - boolean indicating if generating Fission debug info # default = 0 @@ -1298,7 +1298,7 @@ namespace eval Dwarf { # default = 0 (32-bit) # version n - DWARF version number to emit # default = 4 - # addr_size n - the size of addresses, 32, 64, or default + # addr_size n - the size of addresses, 4, 8, or default # default = default # # LABEL is the label of the current unit (which is probably -- 2.26.2