From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by sourceware.org (Postfix) with ESMTP id D924F383F862 for ; Sat, 16 May 2020 18:45:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D924F383F862 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-277-mETqXr-tPP2BSFjRFnjgSQ-1; Sat, 16 May 2020 14:45:24 -0400 X-MC-Unique: mETqXr-tPP2BSFjRFnjgSQ-1 Received: by mail-wm1-f71.google.com with SMTP id n124so1772827wma.1 for ; Sat, 16 May 2020 11:45:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0gpewYbwlwcu9yfnX4hKH9g5v91bIDDQp3nrOOszehU=; b=ihsYx8E8z7XPoJIsqEeYJjYUNTIKCDF7Xg7mKBq3cdu8YijpXnuZm97dtrt4CF0MHj 53zySs9O5dQtdzWdIKselM24soOvG+n4UlSZqTboZBchcci18hNJ0znRgAJdrSUEBwvP ZbGzSB/Rd9IYi3irIx7vrW/Vm/04f+RCdrg9g2M5ufKli2x8OK4C8P4FkuNqil56/za7 W1YaQutbQNhsksnv3yEE1cw3ynPba7tWSKKUn1r4WtctTqUOVd0IrEvNRp3RLF9reGvB xcQVi7tAukM0POab6ZiSSwMxUtMzEhQKs5uoZPm33ZkiRDkfTMOjKgSOjG5ccTZsZfxx fMvQ== X-Gm-Message-State: AOAM53146UUIX3VnJsu+b+4aRUcAlvtSTZ9ZddjDDtF+LQ2cAyi7FPK0 K8pLrg+4fllLyuJcpx33EgwuBuJlC6G9zISIK9uPxCdHE30NRPlF+uHgsmzBwsYM8NPxMz72Oal UlmkS7FPMq44peBBLSD45Qg== X-Received: by 2002:a1c:2302:: with SMTP id j2mr10181678wmj.18.1589654723048; Sat, 16 May 2020 11:45:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/KaVzldFS2s0THJI+m3nnhL33zy36FZjls9kK3NRQkVFbprueDBL1JAnGgWildRaBjEDPeA== X-Received: by 2002:a1c:2302:: with SMTP id j2mr10181663wmj.18.1589654722780; Sat, 16 May 2020 11:45:22 -0700 (PDT) Received: from ?IPv6:2001:8a0:f909:7b00:56ee:75ff:fe8d:232b? ([2001:8a0:f909:7b00:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id a184sm9075952wmh.24.2020.05.16.11.45.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 May 2020 11:45:22 -0700 (PDT) Subject: Re: [RFC][PATCH 0/6] Step program considering the source column information To: Hannes Domani , gdb-patches@sourceware.org References: <20200516172632.4803-1-ssbssa.ref@yahoo.de> <20200516172632.4803-1-ssbssa@yahoo.de> From: Pedro Alves Message-ID: <10a0250a-2dc2-891c-aff0-8c9cd8421936@redhat.com> Date: Sat, 16 May 2020 19:45:20 +0100 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: <20200516172632.4803-1-ssbssa@yahoo.de> Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2020 18:45:30 -0000 Hi, Cool! A few years back, Antoine Tremblay prototyped this as well, but it only worked with Clang, because back then GCC didn't output column information. I complained about it to Jakub Jelinek, who in his usual awesomeness quickly implemented GCC support. :-) Quite nice that we're finally getting closer to actually making use of it in GDB. You can still find Antoine's prototype here: https://github.com/hexa00/binutils-gdb/commits/statement-stepping It would likely be interesting if you could take a look and compare approaches. You should be able to borrow any code you find useful, since he was working for Ericsson at the time, and had a copyright assignment. On the name of the new commands -- for a user, thinking in terms "step until next column" doesn't make sense IMO. What the user really wants is "step until next statement". Column information in the debug info enables this, but it's an implementation detail. In Antoine's version, he thus had "nexts" instead of "nextc", which sounds better to me: add_com ("nexts", class_run, nexts_command, _("\ Step program by statement, proceeding through subroutine calls.\n\ Usage: nexts [N]\n\ Unlike \"steps\", if the current source line calls a subroutine,\n\ this command does not enter the subroutine, but instead steps over\n\ the call, in effect treating it as a single statement.")); add_com_alias ("ns", "nexts", class_run, 1); Thanks, Pedro Alves