From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id NMS4Eamw5GNy/y0AWB0awg (envelope-from ) for ; Thu, 09 Feb 2023 03:36:57 -0500 Received: by simark.ca (Postfix, from userid 112) id 3C1DF1E15D; Thu, 9 Feb 2023 03:36:57 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=heLOJHL/; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_HI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C3F531E112 for ; Thu, 9 Feb 2023 03:36:56 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0736F385828D for ; Thu, 9 Feb 2023 08:36:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0736F385828D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675931816; bh=F0Z1/byD988r3NwpeFIvdJN4O0kF9mQyD00/sMHHCMA=; h=Date:To:Cc:References:Subject:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=heLOJHL/sfx7C2/bdyTyvG96RwfXxBK1uxL+NEs4vrPVeiymWJ7ovqP3cB5g4EL2v m5H1+TxmuoWFfYHHgg+TSHcb1I/Q7bvISvquWBCXCJe1mA2EdZz31G7H4O1vrZxWJT tP/+5HtYB6OxmshopJPi9Z4i7HXAP0RkWDuQNYKo= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 6C07D3858C50 for ; Thu, 9 Feb 2023 08:36:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6C07D3858C50 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pQ2Pr-0005jH-UX; Thu, 09 Feb 2023 03:36:27 -0500 Received: from ip5f5a8893.dynamic.kabel-deutschland.de ([95.90.136.147] helo=[192.168.111.41]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQ2Pr-0000J1-5V; Thu, 09 Feb 2023 03:36:27 -0500 Message-ID: <9b4d3553-5f20-5ba1-8cdf-0d7d213695a9@gnu.org> Date: Thu, 9 Feb 2023 09:36:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: en-US To: Chris Packham Cc: GDB Mailing list References: <36c20830-7713-bff5-ca88-ea8bc2aab8b5@gnu.org> Subject: Re: Is there an option to "silent-step"/ "silent-next" (possibly in python and/or mi)? In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Sobisch via Gdb Reply-To: Simon Sobisch Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" Thank you for taking care! When doing everything "manually" then 'skip' helps a lot - but the case is something like the following: #line source.c 550 { int somevar; #line source.y 12 int interesting = some_call (); #line source.c 560 morecode(); morecode_calling_code_in_source_y_at_line_55(); morecode(); morecode(); #line source.y 13 another_call (); the goal is to "step" from source.y line 12 into some_call(), but when returning back "stepping over" everything until we are "withing" morecode_calling_code_in_source_y_at_line_55 and when coming back reach another_call(), without knowing what code is between. It may consist of several lines or none, consist of several function code, inline assembler, ... If done "automatically" with a defined command (in my case with python) then I can "see" that those lines are not part of "source.y" and can go on stepping, skipping would not be possible as the called functions may be in the same source, too. The problem is that on each "step" there's an event that leads to the Debugger showing the source I'm not interested in. Simon Am 09.02.2023 um 08:00 schrieb Chris Packham: > > > On Thu, 9 Feb 2023, 2:44 AM Simon Sobisch via Gdb, > wrote: > > For "stepping in the current source" (given a mixed-source) I look > for a > way to "silent step" / "silent next". > This will be useful for example if you debug within Bison and/or Flex > generated sources and don't want to step through the state / token > machine, having only the Bison / Flex _source_ be visible. > > Getting the source name from the frame and comparing this after a > step/next is no big problem in GDB using python >     gdb.selected_frame().find_sal().symtab.fullname() > > Using GDB in TUI mode I commonly "stay" in the source I'm interested in > this way, but the GDB command line gets "flooded" with all the > intermediate frame positions I'm not interested in. > > So: is there a way to do a "step"/"next" with suppressing the normal > output and mi stop events normally send? > > Thank you for any pointers, > Simon > > > Does the `skip` command do what you want? I use it for skipping > uninteresting things like memset() or printf() when stepping. >