From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3735 invoked by alias); 6 Mar 2013 09:57:29 -0000 Received: (qmail 3726 invoked by uid 22791); 6 Mar 2013 09:57:28 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,TW_RV,TW_TR 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; Wed, 06 Mar 2013 09:57:24 +0000 Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga101.ch.intel.com with ESMTP; 06 Mar 2013 01:57:23 -0800 X-ExtLoop1: 1 Received: from irsmsx101.ger.corp.intel.com ([163.33.3.153]) by AZSMGA002.ch.intel.com with ESMTP; 06 Mar 2013 01:57:22 -0800 Received: from irsmsx152.ger.corp.intel.com (163.33.192.66) by IRSMSX101.ger.corp.intel.com (163.33.3.153) with Microsoft SMTP Server (TLS) id 14.1.355.2; Wed, 6 Mar 2013 09:57:20 +0000 Received: from irsmsx102.ger.corp.intel.com ([169.254.2.244]) by IRSMSX152.ger.corp.intel.com ([169.254.6.185]) with mapi id 14.01.0355.002; Wed, 6 Mar 2013 09:57:20 +0000 From: "Metzger, Markus T" To: Jan Kratochvil CC: "gdb-patches@sourceware.org" , "markus.t.metzger@gmail.com" Subject: RE: [patch v9 19/23] record, btrace: add record-btrace target Date: Wed, 06 Mar 2013 09:57:00 -0000 Message-ID: References: <1362416770-19750-1-git-send-email-markus.t.metzger@intel.com> <1362416770-19750-20-git-send-email-markus.t.metzger@intel.com> <20130305201300.GS2386@host2.jankratochvil.net> In-Reply-To: <20130305201300.GS2386@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-03/txt/msg00202.txt.bz2 > -----Original Message----- > From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com] > Sent: Tuesday, March 05, 2013 9:13 PM > > + else if (msym !=3D NULL) > > + filename =3D msym->filename; >=20 > No filename from minimal_symbol. >=20 > It prints for me bogus 'interp.c' there: >=20 > 0 genops.c:456-486 __GI__IO_default_xsputn > 1 vfprintf.c:1635-1662 _IO_vfprintf_internal > 2 interp.c strchrnul > 3 vfprintf.c:1662-1666 _IO_vfprintf_internal OK. I'm printing nothing, in this case, now. > One can always find line number information two ways. >=20 > here you use the symbol's line. But sometimes it is not available: > (gdb) p strchrnul > $3 =3D {} 0x7ffff6311480 >=20 > On the other hand line number information (sal - source-and-line) may be > available even for such symbol: > (gdb) info line strchrnul > Line 26 of "/usr/src/debug/glibc-2.17-c758a686/sysdeps/x86_64/strchrnul.= S" starts at address 0x7ffff6311480 and > ends at 0x7ffff6311484 . >=20 > When you display ranges of lines I would find more natural to use the sal= 's > filename, it would also provide more rich info for the .S files. >=20 > It can be also filed as a PR so it does not block gdb-7.6; I wanted to ge= t the > user interface final for the release. OK. I'll prepare a separate patch for that while I'm waiting for a decision on the gdbserver changes. I'll file a PR if the gdbserver approval is fast= er. > > + /* Print the function index. */ > > + ui_out_field_uint (uiout, "index", idx); > > + ui_out_text (uiout, "\t "); >=20 > Why here So the other functions only print one of the fields and leave the formatting to this function. > BTW maybe you could also align the columns by auto-sizing them, GDB does > auto-sizing (each place on its own, no utility for it) of various text ta= bles > output. >=20 > 0 ./common/common-utils.c:124 xstrprintf > 1 ./cli/cli-decode.c:450-451 add_setshow_cmd_full > 2 ./common/common-utils.c:116-121 xstrprintf > 3 ./common/common-utils.c:128-130 xstrvprintf > 4 vasprintf@plt > 5 vasprintf.c:39-50 _IO_vasprintf > 6 memmove@plt > 7 malloc.c:2849-2875 __GI___libc_malloc > 8 mcheck.c:206-223 mallochook > 9 memmove@plt >=20 > This is just a future RFE. OK. > > + } > > + > > + if (bfun->sym !=3D NULL) > > + ui_out_field_string (uiout, "function", SYMBOL_PRINT_NAME (bfun->sym)= ); > > + else if (bfun->msym !=3D NULL) > > + ui_out_field_string (uiout, "function", SYMBOL_PRINT_NAME (bfun->msym= )); > > + ui_out_text (uiout, "\n"); > > + } > > +} > [...] >=20 >=20 > Thanks; those issues could be also left as future PRs/RFEs. I read this as OK. Nevertheless, since I'm resending the series with the m= erged gdbserver changes, you may object if I got this wrong. Thanks, 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