From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 0A8D63858D1E for ; Mon, 19 Jun 2023 17:11:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A8D63858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1687194707; bh=GYjCEgk5nI8vazPTlbUhnODL77DRS0Xh69CIH4tAhBw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=F2s9RK+OPgBfmFzM3TqnK28b3uZZ0XDUqApNY9FNTbXsSSz+CBpj9rSHiN4XNARXT gDQSmmRR2hKdDgV2kYeiHGgbLz6+CfOm1KARRqPzzfF8b9YmLiPXsOUs+ecTc3XrAk EQzss7FiVKlRXLeTP/9o89OLJpbSm1dK7GLqG3Oc= Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 308AA1E0AC; Mon, 19 Jun 2023 13:11:46 -0400 (EDT) Message-ID: Date: Mon, 19 Jun 2023 13:11:46 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH 1/2] Fix reverse stepping multiple contiguous PC ranges over the line table. Content-Language: fr To: Carl Love , Bruno Larsen , gdb-patches@sourceware.org, UlrichWeigand , pedro@palves.net Cc: luis.machado@arm.com References: <74630f1ccb6e9258ae60682105ee5490726fb255.camel@us.ibm.com> <46d73c69-9168-44c6-b515-23dd893fc0eb@redhat.com> <86c65f2ad74caffc162f100e4e9c5be9062a7f59.camel@us.ibm.com> <0a2c4ebd-f01d-4b96-1b13-25d7276056a5@redhat.com> <956b8c3c9a7bdc3aa6f9a040619ec4778edc9c94.camel@us.ibm.com> <89b2fb027024f7e97de7196ee091a0ca11c0c2b3.camel@us.ibm.com> <0943e12c-049d-f8b0-c4c5-8816b1be1e45@simark.ca> <961a88a7-a820-fd32-c7ee-e707697e22a5@simark.ca> <60ba16fb9207f7e6313265aa0a118f65787b52f7.camel@us.ibm.com> From: Simon Marchi In-Reply-To: <60ba16fb9207f7e6313265aa0a118f65787b52f7.camel@us.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 5/16/23 18:54, Carl Love wrote: > Simon, GDB maintainers: > > Per the comments on version 4 for the gdb.reverse/func-map-to-same- > line.exp, I have added support to proc gdb_compile to enable or disable > generating line information as part of the debug information. The two > new options are column-info and no-column-info. > > This patch implements the new options for gdb_compile. > > These options have been tested with patch 2 of 2 on PowerPC with the > GCC and clang compilers. > > Please let me know if the patch is acceptable for mainline. Thanks. > > Carl > > ------------------------------------------------------------- > > Add gdb_compile options column-info and no-column-info > > This patch adds two new options to gdb_compile to specify if the compile > should or should not generate the line table information. The > options are supported on clang and gcc version 7 and newer. > > Patch has been tested on PowerPC with both gcc and clang. > --- > gdb/testsuite/lib/gdb.exp | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index aed7e2d043c..e993fddf4c7 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -4794,6 +4794,8 @@ proc quote_for_host { args } { > # debug information > # - text_segment=addr: Tell the linker to place the text segment at ADDR. > # - build-id: Ensure the final binary includes a build-id. > +# - no-column-info: Disable generation of column table information. > +# - column-info: Enable generation of column table information. > # > # And here are some of the not too obscure options understood by DejaGnu that > # influence the compilation: > @@ -5003,6 +5005,34 @@ proc gdb_compile {source dest type options} { > } else { > error "Don't know how to handle text_segment option." > } > + } elseif { $opt == "column-info" } { > + if {[test_compiler_info {gcc-*}]} { > + if {[test_compiler_info {gcc-[1-6]-*}]} { > + error "gdb_compile option no-column-info not supported." I think this path should return the equivalent of "failed to compile", instead of throwing an error. Control will go back to the test, which will generally skip the portion of the test that requires that binary. > + } > + lappend new_options "additional_flags=-gcolumn-info" > + > + } elseif {[test_compiler_info {clang-*}]} { > + lappend new_options "additional_flags=-gcolumn-info" > + > + } else { > + error "Don't know how to handle gcolumn-info option." I think it's ok to throw an error in this path. If you are testing against a compiler that we don't know about, it will produce errors that are easy to spot, and you'll be able to add support for your compiler here. Simon