From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14494 invoked by alias); 31 May 2012 18:53:36 -0000 Received: (qmail 14485 invoked by uid 22791); 31 May 2012 18:53:35 -0000 X-SWARE-Spam-Status: No, hits=-5.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vb0-f41.google.com (HELO mail-vb0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 May 2012 18:53:22 +0000 Received: by vbbey12 with SMTP id ey12so991744vbb.0 for ; Thu, 31 May 2012 11:53:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-system-of-record :x-gm-message-state; bh=MvYr5glztYOhGAeRcFMIfMFOxY39TFfTfsUq3VmMmEY=; b=HC1cmGTeqfbI1lSlsnbzG0o2D1AZ4GZRfNTMbB4G8lUpGl7gxH/H8OtxU5lf84VmkB 3Amymdlr2tNLZoSnU20WfcgApBBPByViv4hPDxFrHTvgCZnWLA0Xf01qMFKDWLFLi4Oc vFmJbNE5A4OpF9Y/TV3hx32bO7stff37YZWKNEywiB013y9M4YUSSjj3u4XiSMavE/ci 5fA6mmnsBEXp0aJAvoIjTUyCrA1bV3HBuAl50/gu6pNDAvGo2SORDA8dYvtxpHFZCS08 tbVHiyJ8NqrOxbLiD06y6jpjjJRNVFSMDr/Lxpwxy3oMAF1jQTpLz4m1vtTKOH55/eEo iAxA== Received: by 10.220.226.68 with SMTP id iv4mr6990735vcb.21.1338490401499; Thu, 31 May 2012 11:53:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.226.68 with SMTP id iv4mr6990698vcb.21.1338490401020; Thu, 31 May 2012 11:53:21 -0700 (PDT) Received: by 10.52.161.199 with HTTP; Thu, 31 May 2012 11:53:20 -0700 (PDT) In-Reply-To: References: <20120524175852.D38381E139C@ruffy2.mtv.corp.google.com> <4FBF47DD.4030100@redhat.com> Date: Thu, 31 May 2012 18:53:00 -0000 Message-ID: Subject: Re: [RFA] massively speed up "info var foo" on large programs From: Doug Evans To: Pedro Alves Cc: gdb-patches@sourceware.org, ratmice@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQkvGD8Jkh7XgCoFH3Aqi6mcNQHfbR+KHsCZlkr00KxePDOaUJu9Ozy7LDWpevxpbU20jnCZqVeJKGx7IV786oe/SsVktjAxm7YUc+nBRm61Rl1/CViTHES9/HCgbnMjCSPONotOJ7UCI3vA146nhfrFCqLnFA== 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: 2012-05/txt/msg01100.txt.bz2 Ping. I'm happy with this patch enough to check it in in a few days if there are no objections. [Note that the "interesting" case only comes up when a PLT entry refers to a function that isn't present in any objfile. If it is present in another objfile then it will be printed there.] On Sun, May 27, 2012 at 9:49 PM, Doug Evans wrote: > On Fri, May 25, 2012 at 1:50 AM, Pedro Alves wrote: >> On 05/25/2012 09:21 AM, Doug Evans wrote: >> >>> >>> The output is different from the previous code, I didn't take into >>> account the symbols that gdb creates for @plt entries. =A0I think if we >>> want to continue to provide the current output, we should add an >>> option to "info var|fun|type" to produce it: the normal case shouldn't >>> be that slow. >> >> >> Different how? =A0The patch has no testsuite updates, so the email reade= r is >> left wondering. =A0;-) > > In the "Non-debugging symbols" section of the output, when a symbol > would have been found in another objfile, the code would have not > printed the non-@plt form of the function name. > With this patch we have a decision to make. =A0Searching all the other > objfiles is not reasonable (IMO) so what to do? =A0I can think of two > possibilities: always print it or never print it. =A0Since the symbol in > question is an artificial symbol created by gdb I have opted for never > printing it. > > Thus instead of seeing this in the "Non-debugging symbols" section of > the output: > > 0x1234 foo@plt > 0x1234 foo > > the output will contain: > > 0x1234 foo@plt > > Here is v3 of the patch. =A0I added a testcase. > Regression tested on amd64-linux. > > Ok to check in? > > 2012-05-27 =A0Doug Evans =A0 > > =A0 =A0 =A0 =A0* symtab.c (minimal_symbol): New member created_by_gdb. > =A0 =A0 =A0 =A0* elfread.c (elf_symtab_read): Set created_by_gdb for @plt > minsym > =A0 =A0 =A0 =A0created by gdb. > =A0 =A0 =A0 =A0* symtab.c (lookup_msymbol_in_objfile): New function. > =A0 =A0 =A0 =A0(search_symbols): Call it. =A0Only scan minsyms if nfiles = =3D=3D 0. > > =A0 =A0 =A0 =A0testsuite: > =A0 =A0 =A0 =A0* gdb.base/info-fun.exp: New file. > =A0 =A0 =A0 =A0* gdb.base/info-fun.c: New file. > =A0 =A0 =A0 =A0* gdb.base/info-fun-solib.c: New file.