From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sonic304-23.consmr.mail.ir2.yahoo.com (sonic304-23.consmr.mail.ir2.yahoo.com [77.238.179.148]) by sourceware.org (Postfix) with ESMTPS id 1094B385DC1F for ; Sun, 17 May 2020 00:08:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1094B385DC1F X-YMail-OSG: 2zwfmV0VM1n0Tl11IWspSiImx3dqSNsVjG3ASU8F0_XpBrDTKL4aImcr03lrhLY VOkMGsXgD_SJ3EtEBqpzSjaEbCkrWp6e_3R6aMkarZZ4HYQ9j9qTp7.zW2SwLgeOuJdvUoiiCLDx grtWfl8.vGETDGd7wJOJ8DLwgBA4kmCTR7d.BZhQwfJwNk5GD9HyQdricmOZqDlEb.aPkm7umD26 AtnNdqFrquBiEcDrpZc0XgLTK5Ov6R0pmgar5EJsunTmumaJQIHF8GN0hWZYQF1Zqw7A7vbdnnTa FqUNeLKf5AApPSGox0QsYKf.JBJpldIvK6Yy7XhdIgvZ5GNNFSvESIxW8F.VSI3pOU_cMUM2cSi0 dz9iO0xnu3DI1Jyh_3scvIeVTnxbkJ9FNZvGSr9_UyEfuGtVovRw58m4yhXHIO2MX26mnPzu4irz idNGI14jYfOnS3WSa0771KyGT8e9Te4dS41tEZ33CgIvd_22_6ZdXPGMzU_vf_cZXMlJv0.sE1n1 4X3m7uJGJ1hKofkX3p8HTmsozvAUiCzTGbYEgdYyTUDTd2XF8RttmLTO21QT3u6E3ghfRyTbyiFW Tprh5xIaN88dlKTVfIGiT8YTXLnuMCYIXztsxTDUIByOoTER8oxIdawt_Ao4.ITXgy9BL4I_P8ZG 6QxhCXqfGRaJ2tiWLHWSWsaZoWkfpRJr6GK_sbWouaAwclbvgoYcE4yL5StKttTQD1JtQQAtRK3b CZQ1eIje3p5k8nYDl5UK1j3gRv3wYCQHSoKKatk4NWDdgsY7jGNKwGUIAD4__GDhShkOZGlIgvQp p2TJHitUI91KYPujYADhefYOpW0Fm.rssoMvXhbpZPMWpsjbQMNZ9LlEBGQcLl2o7RF5V2eBv5rj diCzGKLTmvY_6ouAEESG7Dl6nXDa3S5.P09W4JfxzqdBw_FSJGxuz9kEfMchcStyifgNtolWPNQa lqVLa3POl71rP5AK9n156G5qLnaBQWIFTmZuTam7VRSY9SyXXGNVZjGQ.hKXx9GaF19bkXkIs0PZ M6UdFTRDTj2F0rHkRRb4fbdXv6CIF6Chvo61I_BF8BMrkMhxNJ1KeQLn7NgTOtJEhiARLlM4FhDR TvZMkBRVG9khrUiYGY8GuA4_b4c.FF2pCeAct0ohq_PemSPHcdkR51qhknBJhdzh0JoqZWrI8p_O KceQ_qbScO74ZwJVSxG0drmsgsxB7hH92_ZB.zBYvoItgHjIyVZ36DiEHwEsR4YsdOiXkqwbbOwb cdMwoWPaDVis4pc0XxWgLzOivl9nHyJheCDS9TYTAyJXphD.pifP2WnEhg9sElC8LkZFSgBfkgoW u8P7vD7IL2NE- Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Sun, 17 May 2020 00:08:43 +0000 Date: Sun, 17 May 2020 00:08:41 +0000 (UTC) From: Hannes Domani To: Gdb-patches Message-ID: <214896821.2653465.1589674121844@mail.yahoo.com> In-Reply-To: <10a0250a-2dc2-891c-aff0-8c9cd8421936@redhat.com> References: <20200516172632.4803-1-ssbssa.ref@yahoo.de> <20200516172632.4803-1-ssbssa@yahoo.de> <10a0250a-2dc2-891c-aff0-8c9cd8421936@redhat.com> Subject: Re: [RFC][PATCH 0/6] Step program considering the source column information MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.15942 YMailNorrin Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0 X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, 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: Sun, 17 May 2020 00:08:48 -0000 Am Samstag, 16. Mai 2020, 20:45:30 MESZ hat Pedro Alves Folgendes geschrieben: > Hi, > > Cool!=C2=A0 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.=C2=A0 I complained about it > to Jakub Jelinek, who in his usual awesomeness quickly implemented > GCC support.=C2=A0 :-)=C2=A0 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 I didn't know about that, interesting. Is there some reason why this wasn't included in gdb back then? > It would likely be interesting if you could take a look and compare > approaches.=C2=A0 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. I just checked it out for a bit. The actual implementation in process_event_stop_test() is a lot simpler, I will have to try it out and compare the result, maybe that means mine is unnecessary complicated. And the calculation of the column indicator position is also more complicat= ed in mine, but that's because I had to account for the escape sequences of the syntax highlighting. > On the name of the new commands -- for a user, thinking in terms > "step until next column" doesn't make sense IMO.=C2=A0 What the user real= ly wants > is "step until next statement".=C2=A0 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: > >=C2=A0=C2=A0 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.")); >=C2=A0=C2=A0 add_com_alias ("ns", "nexts", class_run, 1); Yes, he has nexts (ns) and steps (ss), I don't really mind either way. I used nextc/stepc because that was suggested in PR25913. Hannes