From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66824 invoked by alias); 26 Aug 2019 13:18:16 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 66814 invoked by uid 89); 26 Aug 2019 13:18:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=H*i:sk:jVkCEgO, HX-Languages-Length:787, H*f:sk:jVkCEgO, Youll X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 26 Aug 2019 13:18:14 +0000 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE864C02832B for ; Mon, 26 Aug 2019 13:18:13 +0000 (UTC) Received: by mail-wr1-f72.google.com with SMTP id a17so9748735wrw.3 for ; Mon, 26 Aug 2019 06:18:13 -0700 (PDT) Received: from ?IPv6:2001:8a0:f913:f700:4c97:6d52:2cea:997b? ([2001:8a0:f913:f700:4c97:6d52:2cea:997b]) by smtp.gmail.com with ESMTPSA id v7sm12559336wrn.41.2019.08.26.06.18.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 26 Aug 2019 06:18:11 -0700 (PDT) Subject: Re: gdb command "next" wrongly working as command "step" To: William Tambe References: <20190818041556.GA11323@host1.jankratochvil.net> <20190818090556.GA19968@host1.jankratochvil.net> Cc: Jan Kratochvil , gdb@sourceware.org From: Pedro Alves Message-ID: <07bcdea5-1eda-4412-36d3-2a8eac399089@redhat.com> Date: Mon, 26 Aug 2019 13:18:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-08/txt/msg00042.txt.bz2 On 8/25/19 8:04 PM, William Tambe wrote: > Please see below, less noisy GDB output showing a working backtrace > where I can see the caller in frame #1; but yet GDB command "next" is > working as though it was "step"; any suggestion where else I could > look ? - You'll just have to debug gdb. Try to figure out why this code, inside the "infrun: stepped into subroutine" block,seemingly isn't being reached: /* Set a breakpoint at callee's return address (the address at which the caller will resume). */ insert_step_resume_breakpoint_at_caller (frame); - I'd use "nexti" instead of "next" to try stepping over the instruction that calls the subroutine, just to make it easier to debug what goes wrong. Thanks, Pedro Alves