From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 817003858D39 for ; Tue, 8 Aug 2023 10:04:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 817003858D39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691489055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AtDUvJW0XL07WIOycY8dF8zDtzANMKFn4RcY8vNiMAA=; b=CzTiuJW2e8mZq/Yif5emfWd5Evit9wDEGiTf4F/hhRdow2eZto64CQCQ/zfvQdJq5sTGUU 5lh3td7kcz+oO2Ty9uR2qmqWiwvCUZRVHr8OJB9KgYMk2XMJ31nryT9LNxh3tyhupjL/XS YHv1uhlxVqbYvBd20MJtVDxKHHjprKU= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-64-yvEHs5pFODe7OpfePBsxNA-1; Tue, 08 Aug 2023 06:04:14 -0400 X-MC-Unique: yvEHs5pFODe7OpfePBsxNA-1 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-63d062fc6f8so67024746d6.3 for ; Tue, 08 Aug 2023 03:04:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691489053; x=1692093853; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AtDUvJW0XL07WIOycY8dF8zDtzANMKFn4RcY8vNiMAA=; b=eLV7MOOW/rskd0tOohlc1eqZ9xd2+mm+jRN0IQhFqkVziyuvGw7/PXLDADsHy2iH46 Cbgzfet6JGTBQoKjqW2YWKicxLP7JYShafChiOL0GJMCBNlajc0TVTTySOlan8OhfeuV IyIoaF9/GPxyuewBxHOP03BQfWCvlAUFz6uFkTkz8eNxKjwqfpE6X4DN/JAZTP9I0hyn gaRhyfuyOwIlNgRoyayIPvLhI9QvWTbegWDebAdF20Nz4ahEk7Wzebc5E2RQR2zSwp9V pAh2ozAyLmL2HLwvpsKLUcmKqXR5rqlp26SctdYWT68M7QtCVq2xWpsbu4QSdNzvhE1/ PlvQ== X-Gm-Message-State: AOJu0YxHJHG4AAbRlOTWg/az05a9oNTj4rewVI3HR5hLqM/N7q5t8HOJ Cz+UFX8IxY7fYeobYD7VsFSQurJgOxhMOLjwjWPt/3XC21ei+zuBEt7lRSZ0LqkEST6KFrCvGSu ZoOKNp+8ynFB4hQcyyQFpnaB99VZFXA== X-Received: by 2002:a0c:fa10:0:b0:63d:212e:8ae7 with SMTP id q16-20020a0cfa10000000b0063d212e8ae7mr11176076qvn.14.1691489053480; Tue, 08 Aug 2023 03:04:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHm1xbVT/xvLAYr19RCmGh0PVmRd4wkR77BlOJrpjfhONpyGRLNcfO+AcMfwtzMxRcwWGTs5A== X-Received: by 2002:a0c:fa10:0:b0:63d:212e:8ae7 with SMTP id q16-20020a0cfa10000000b0063d212e8ae7mr11176061qvn.14.1691489053233; Tue, 08 Aug 2023 03:04:13 -0700 (PDT) Received: from [192.168.0.129] (ip-94-112-225-44.bb.vodafone.cz. [94.112.225.44]) by smtp.gmail.com with ESMTPSA id y14-20020a0ce04e000000b0063f7a2847bcsm2718709qvk.51.2023.08.08.03.04.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Aug 2023 03:04:11 -0700 (PDT) Message-ID: <387d9d9d-6f4f-696b-ff18-f68974a7da39@redhat.com> Date: Tue, 8 Aug 2023 12:04:09 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 1/2 ver 2] Fix reverse stepping multiple contiguous PC ranges over the line table. To: Carl Love , Simon Marchi , gdb-patches@sourceware.org, UlrichWeigand , pedro@palves.net Cc: luis.machado@arm.com References: <3a46ac42391707325ee2aab900d13bce05c8a0b8.camel@us.ibm.com> From: Guinevere Larsen In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP 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 07/08/2023 21:03, Carl Love wrote: > Simon, GDB maintainers: > > Version 2, updated the compiler check and handling for gcc version 6 > and earlier. Retested on Power 10. > > 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 | 34 ++++++++++++++++++++++++++++++++++ > 1 file changed, 34 insertions(+) > > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index 36bf738c667..bffbbf38b09 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -4896,6 +4896,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: > @@ -5105,6 +5107,38 @@ proc gdb_compile {source dest type options} { > } else { > error "Don't know how to handle text_segment option." > } > + } elseif { $opt == "column-info" } { > + # If GCC or clang does not support column-info, compilation > + # will fail and the usupported column-info option will be > + # reported as such. > + if {[test_compiler_info {gcc-*}]} { I think you missed a bit on an old comment from simon. Way back in may, in this email https://sourceware.org/pipermail/gdb-patches/2023-May/199523.html, he mentioned: For instance, if you used no-column-info with gcc 6 (which doesn't support column info at all), gdb_compile should succeed, even if there isn't an option to disable column info with that compiler. If you used column-info with gcc 6, gdb_compile would fail. So I think this bit should throw an error if it detects gcc-[1-6]. > + lappend new_options "additional_flags=-gcolumn-info" > + > + } elseif {[test_compiler_info {clang-*}]} { I did some digging, and column-info were added in llvm back in october 2012 (commit a2f7eb7c52cdc), which seems to mean support was added in llvm 3.2, but I don't see any mention in the release notes. In my opinion, this is old enough that we don't need to have a special case, but I wanted to mention, in case some maintainer thinks it should be dealt with. If we should, before then, it seems that clang WOULD add column info by default, so it should compile with a warning here, and fail if the user requested no column info -- Cheers, Guinevere Larsen She/Her/Hers > + lappend new_options "additional_flags=-gcolumn-info" > + > + } else { > + error "Don't know how to handle gcolumn-info option." > + } > + > + } elseif { $opt == "no-column-info" } { > + if {[test_compiler_info {gcc-*}]} { > + if {[test_compiler_info {gcc-[1-6]-*}]} { > + # In this case, don't add the compile line option and > + # the result will be the same as using no-column-info > + # on a version that supports the option. > + warning "gdb_compile option no-column-info not supported, ignoring." > + } else { > + lappend new_options "additional_flags=-gno-column-info" > + } > + > + } elseif {[test_compiler_info {clang-*}]} { > + lappend new_options "additional_flags=-gno-column-info" > + > + } else { > + error "Don't know how to handle gno-column-info option." > + } > + > } else { > lappend new_options $opt > }