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 D8A5E3858C2F for ; Fri, 23 Jun 2023 17:49:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D8A5E3858C2F 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=1687542563; bh=X2hoedAsgcGHl8pODAY4KD7SMB9QTNOKQAHGlJLSfvU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=pDITN0GRKBpDWJoglgfXuyoEFYnc1CRMpaK2x7I9nHYrqEjA3/1CC+HuiaL3EVfPP oD6PeMXaQ0LKGhtYJcMfNHZWFjDG66V9OM3JDq4KWY6OQoE4oGPR3AU7LJP6kvbmDs zr1vHHSThy+tkKITQl5bpxNw1nRheVf2kHh5wsG4= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (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 C30EB1E0AC; Fri, 23 Jun 2023 13:49:22 -0400 (EDT) Message-ID: <4af9b32a-540c-43d8-69b7-f9f16aeb0811@simark.ca> Date: Fri, 23 Jun 2023 13:49:22 -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 2/2 v5] Fix reverse stepping multiple contiguous PC ranges over the line table. Content-Language: en-US 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> <2e13271b-1f75-14a4-74da-ba1c0df59435@simark.ca> <93bd0e348673cf870b5fe20b5f3a2760fe5ef3a4.camel@us.ibm.com> From: Simon Marchi In-Reply-To: <93bd0e348673cf870b5fe20b5f3a2760fe5ef3a4.camel@us.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.0 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: On 6/22/23 16:38, Carl Love wrote: > Simon: > > On Mon, 2023-06-19 at 13:58 -0400, Simon Marchi wrote: > > >> > 100644 >>> --- a/gdb/infrun.c >>> +++ b/gdb/infrun.c >>> @@ -114,6 +114,9 @@ static struct async_event_handler >>> *infrun_async_inferior_event_token; >>> Starts off as -1, indicating "never enabled/disabled". */ >>> static int infrun_is_async = -1; >>> >>> +static CORE_ADDR update_line_range_start (CORE_ADDR pc, >>> + struct >>> execution_control_state *ecs); >>> + >> >> This forward-declaration is not needed. > > I tried removing the forward-declaration and the compile fails with the > message: > > ../../binutils-gdb-reverse-multiple-contiguous/gdb/infrun.c:6773:1: > error: no previous declaration for ‘CORE_ADDR > update_line_range_start(CORE_ADDR, execution_control_state*)’ [- > Werror=missing-declarations] > 6773 | update_line_range_start (CORE_ADDR pc, struct > execution_control_state *ecs) > | ^~~~~~~~~~~~~~~~~~~~~~~ > cc1plus: all warnings being treated as errors > make[2]: *** [Makefile:1922: infrun.o] Error 1 > make[2]: Leaving directory '/home/carll/GDB/build-reverse-multiple- > contiguous/gdb' > make[1]: *** [Makefile:13569: all-gdb] Error 2 > make[1]: Leaving directory '/home/carll/GDB/build-reverse-multiple- > contiguous' > make: *** [Makefile:1005: all] Error 2 > > Leaving the forward declaration in the code. Because you need to put "static" at the other place (line 6813). Simon