From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16970 invoked by alias); 18 Feb 2013 14:51:05 -0000 Received: (qmail 16947 invoked by uid 22791); 18 Feb 2013 14:51:03 -0000 X-SWARE-Spam-Status: No, hits=-7.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga03.intel.com (HELO mga03.intel.com) (143.182.124.21) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 18 Feb 2013 14:50:56 +0000 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga101.ch.intel.com with ESMTP; 18 Feb 2013 06:50:54 -0800 X-ExtLoop1: 1 Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by AZSMGA002.ch.intel.com with ESMTP; 18 Feb 2013 06:50:53 -0800 Received: from irsmsx152.ger.corp.intel.com (163.33.192.66) by IRSMSX104.ger.corp.intel.com (163.33.3.159) with Microsoft SMTP Server (TLS) id 14.1.355.2; Mon, 18 Feb 2013 14:50:51 +0000 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.108]) by IRSMSX152.ger.corp.intel.com ([169.254.6.135]) with mapi id 14.01.0355.002; Mon, 18 Feb 2013 14:50:51 +0000 From: "Metzger, Markus T" To: Jan Kratochvil CC: Eli Zaretskii , "gdb-patches@sourceware.org" , "markus.t.metzger@gmail.com" Subject: RE: [rfc 6/8] record disas: omit function names by default Date: Mon, 18 Feb 2013 14:51:00 -0000 Message-ID: References: <1360859352-30399-1-git-send-email-markus.t.metzger@intel.com> <1360859352-30399-7-git-send-email-markus.t.metzger@intel.com> <20130215161049.GA6219@host2.jankratochvil.net> <831uchtp4y.fsf@gnu.org> <20130215183256.GA16845@host2.jankratochvil.net> <83sj4xs8hp.fsf@gnu.org> <20130215190955.GA18269@host2.jankratochvil.net> <20130218130247.GA7250@host2.jankratochvil.net> <20130218141311.GA9315@host2.jankratochvil.net> In-Reply-To: <20130218141311.GA9315@host2.jankratochvil.net> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-02/txt/msg00457.txt.bz2 > -----Original Message----- > From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com] > Sent: Monday, February 18, 2013 3:13 PM > > I intend to remove the "btrace" command and all its sub-commands. I jus= t kept them > > so people can compare them with the new "record" commands. > > > > Regarding "brace list" I do not plan to add a corresponding "record" co= mmand. >=20 > What should do the current "record list" hook other than what "btrace lis= t" did? >=20 > Current to_list_record and to_list_record_range are always left NULL in > archer-mmetzger-btrace so there isn't what to compare yet:) > (gdb) record list > You can't do that when your target is `record-btrace' It should print 10 source lines around the current position and allow you to iterate over the execution log on source level. It should essentially produce the same output as repeating "reverse step" 10 times and discarding everything except for the current source position echoed when the "reverse step" command completes. A rough first algorithm would be: for (;insn in bounds; ++/--insn) { sal =3D lookup source and line at insn if (sal =3D=3D last_sal) continue; last_sal =3D sal; print source and line if (++printed >=3D record_list_size) break; } This does not consider multi-line expressions or non-code source lines. For= heavily optimized code or for code that frequently splits expressions over multiple= lines, this may be less helpful - at least in the above version. It also omits com= ments, which some might consider a drawback, as well. This goes beyond what "btrace" did and has the potential for lots of discus= sions - especially when considering optimized code. It might be better if we postponed it in favor of reverse-stepping, but I w= anted it to be considered when we're discussing the new "record" commands to avoid t= hat we call what I called "record backtrace" "record list" and thus don't have = an appropriate name left for such a source listing command. Regards, Markus. Intel GmbH Dornacher Strasse 1 85622 Feldkirchen/Muenchen, Deutschland Sitz der Gesellschaft: Feldkirchen bei Muenchen Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk Registergericht: Muenchen HRB 47456 Ust.-IdNr./VAT Registration No.: DE129385895 Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052