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 87AEC3858C54 for ; Thu, 11 May 2023 17:28:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87AEC3858C54 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca 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) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id B805F1E114; Thu, 11 May 2023 13:28:40 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1683826121; bh=N+sbgUiMHT6B6YLdzD7OLD7LAlzcSKrTcWkKSndErqw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=PlcNSOgiGeUOayjER8q+Z+s+F13/jwYsgLi2TlW19Z/NQrGxkev8VBr5ZtiI1MlG/ QH4/UqmjzusbiR4mqMnSAITxADPSYCwv/z/DYWICOeWKMsbZnlUd80erdPDi6JXX91 6dNyt6w96XYbjKmL1mp7+1udSz7W262MeBJw2qn0= Message-ID: <961a88a7-a820-fd32-c7ee-e707697e22a5@simark.ca> Date: Thu, 11 May 2023 13:28:40 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v4] Fix reverse stepping multiple contiguous PC ranges over the line table. Content-Language: fr To: Bruno Larsen , Carl Love , 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> From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: > I was going to suggest something similar in an earlier revision, but > when I tried to look for how to control it in clang, I couldn't see it > at all, that's why I thought it was OK to restrict it to gcc only. Can > clang (or other compilers for that matter) emit this information?clang does, yes, with the same flags as gcc: https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-gcolumn-info > Also, how would gdb_compile handle if the current compiler doesn't > support a given option, but the others do? Should it loudly fail, or > silently ignore the "broken" option? If the second, I guess there is > no harm in allowing clang to run these tests and testing the same > scenario twice I'm not sure, you'd have to look at how other options are handled. But intuitively, if gdb_compile isn't able to fulfill your request, then it should fail. 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. If there exists some compiler that always emits column info, with no option to turn it off, then column-info would work with that compiler, but no-column-info wouldn't. To start with, I think it's fine to make column-info and no-column-info map to -gcolumn-info and -gno-column-info. And then, you can probably teach gdb_compile about older gccs and older clangs that don't support column info. If people test with other compilers that don't support -gcolumn-info or -gno-column-info, the test won't compile. They can then contribute support for the column-info / no-column-info options for that compiler. Simon