From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org 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 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:Subject:From:References:To:MIME-Version: Date; bh=F0Z1/byD988r3NwpeFIvdJN4O0kF9mQyD00/sMHHCMA=; b=Bm/lTZAFH58C1vdSIdo+ BRMo1sXcPl1D8Ze9hie3fe0gn9j1mXdCihq/tR1kRgwHSRFZ8jbGEZv5BeiPMSp9qziExqiefOupj EJvGf45Uwh0HskriHV6UwUEPZGG2HU6BNN854NwmJC0wpAv+wp+Dolmc1oRy2o/vnyh7W9f+AcUj8 IcMdfnA3JiS545JzRGlCbALw3i9ix4VKkU2LJqRb/6dpPV0C1kZ2qEURLo1EdD0PpLvFuTtXohPtK fbG19CCe6kLZlLdIUvjD657W6K1qwJwwFvthgncQbFTiK0MUcFB5sWPN4BXs/ssIF0xp+K/QoGnhR M+JknTuKGD9LAw==; 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> From: Simon Sobisch 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-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,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: 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. >