From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by sourceware.org (Postfix) with ESMTPS id 093953858D1E for ; Tue, 24 Jan 2023 19:26:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 093953858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f50.google.com with SMTP id q10-20020a1cf30a000000b003db0edfdb74so1391959wmq.1 for ; Tue, 24 Jan 2023 11:26:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:references:cc:to:from:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RLPQOyuQF6ByoV1WCexSGGXJcKhJrXW7pQaEZXmFbQk=; b=YoOau7qlABlxtfziUeHe0MKYgXNLr6cH6cvlAsqrXs4x3sMXOKwHvKJ3I62bX0z4/e u4kwrrmmtxGpoomGMz9jJ7SJTZfWbezoA6OeNvra+RCUpkFW6ApMhkIHQminAiQb8Wk4 1//K5HUF9bDjg3bq8lPFVe/Q2CIB2I0v4hNl5Gpa6DcPPHPsKHUwaLakFL/14TpqFQDw znVCiXNwof8WJ/iYAdcbSwAnAjlVmXarOto8gyqn+GQEFmKHenmiKWgX9PRe7uGeGHD3 c6KcLui9xLaQ+I0zBF8k2Yp98feKZEQTcShnj3E/NZFN16XZ8ZaiXsblxt7t9W+z7B5z GrtA== X-Gm-Message-State: AFqh2kpx8uLrzR0mOWg46IMvUmOJXd9VDqFzBg6XxFSLgOJVHuxWzXuU u/shaFoqdF5fRZCeaGOF2AQQgG+FRjzt/w== X-Google-Smtp-Source: AMrXdXuKgKLJH6gMwnmGs8lGKwosS5CVkIPw0yjGDo2ColxkyH/f/GqKC4SlqFduLZL3Z/wPZIyizg== X-Received: by 2002:a05:600c:5545:b0:3d9:f806:2d26 with SMTP id iz5-20020a05600c554500b003d9f8062d26mr29452754wmb.7.1674588386084; Tue, 24 Jan 2023 11:26:26 -0800 (PST) Received: from ?IPv6:2001:8a0:f92b:9e00::1fe? ([2001:8a0:f92b:9e00::1fe]) by smtp.gmail.com with ESMTPSA id d11-20020adfa34b000000b002366553eca7sm2630893wrb.83.2023.01.24.11.26.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Jan 2023 11:26:25 -0800 (PST) Subject: Re: [PATCH 1/2 version 3] fix for gdb.reverse/finish-precsave.exp and gdb.reverse/finish-reverse.exp From: Pedro Alves To: Carl Love , Bruno Larsen , Ulrich Weigand , gdb-patches@sourceware.org Cc: Luis Machado References: <89331c26795e3f7743e1e068dce43b3c2dd53008.camel@us.ibm.com> <071f24ecf9b3a2bbbe8fee7db77492eb55c5f3ff.camel@us.ibm.com> <1d9b21914354bef6a290ac30673741e722e11757.camel@de.ibm.com> <3e3c9c40f07ab01c79fe10915e76ffa187c42ad9.camel@us.ibm.com> <122f5d2d3db9ef1979b0f8da927d005f32bba82c.camel@us.ibm.com> <011768e8-2b76-f8ed-1174-fbaa020b15e7@redhat.com> <58cebd1a-7883-fbc6-ac94-c67293f8fc8d@redhat.com> <5e5dc4a49aa8feb370419a1efecf277673b7dfc7.camel@us.ibm.com> <610d5f171d5f4baeb94887217e69d0e6d70e9d66.camel@us.ibm.com> <873eb58a-a6ab-08b2-0827-ca6e0c8088ae@palves.net> Message-ID: <59eb57f8-c86c-322c-a177-04b08517d5b6@palves.net> Date: Tue, 24 Jan 2023 19:26:24 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,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 2023-01-24 7:21 p.m., Pedro Alves wrote: > And that is the bug. reverse-next/reverse-step should _never_ stop at the same line. > Same as forward step/next. For instance, this "next" command will just continue > stepping forever: > > Temporary breakpoint 1, main (argc=1, argv=0x7fffffffdc98) at reverse.c:11 > 11 while (1); > (gdb) next > > Same for "step" instead of "next". > > It turns out that reverse-next/step do stop immediately! > > (gdb) reverse-next > 11 while (1); > (gdb) reverse-next > 11 while (1); > (gdb) > > That's probably caused by the same bug. >From the documentation: reverse-step [count] Run the program backward until control reaches the start of a different source line; ^^^^^^^^^ Emphasis mine.