Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org, ratmice@gmail.com
Subject: Re: [RFA] massively speed up "info var foo" on large programs
Date: Thu, 31 May 2012 18:53:00 -0000	[thread overview]
Message-ID: <CADPb22STGbUrVDMLpEiPkQVRZ6Mt84q5Sc4hynRYNS19vM_1Jw@mail.gmail.com> (raw)
In-Reply-To: <CADPb22Tnz7rK7VpwKW-cwMJm+tMwThoe5h=r=AH_sX=CwQat6g@mail.gmail.com>

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 <dje@google.com> wrote:
> On Fri, May 25, 2012 at 1:50 AM, Pedro Alves <palves@redhat.com> 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.  I 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?  The patch has no testsuite updates, so the email reader is
>> left wondering.  ;-)
>
> 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.  Searching all the other
> objfiles is not reasonable (IMO) so what to do?  I can think of two
> possibilities: always print it or never print it.  Since 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.  I added a testcase.
> Regression tested on amd64-linux.
>
> Ok to check in?
>
> 2012-05-27  Doug Evans  <dje@google.com>
>
>        * symtab.c (minimal_symbol): New member created_by_gdb.
>        * elfread.c (elf_symtab_read): Set created_by_gdb for @plt
> minsym
>        created by gdb.
>        * symtab.c (lookup_msymbol_in_objfile): New function.
>        (search_symbols): Call it.  Only scan minsyms if nfiles == 0.
>
>        testsuite:
>        * gdb.base/info-fun.exp: New file.
>        * gdb.base/info-fun.c: New file.
>        * gdb.base/info-fun-solib.c: New file.


  reply	other threads:[~2012-05-31 18:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 17:59 Doug Evans
2012-05-24 21:28 ` Doug Evans
2012-05-25  4:29   ` Matt Rice
2012-05-25  8:21   ` Doug Evans
2012-05-25  8:51     ` Pedro Alves
2012-05-28  4:49       ` Doug Evans
2012-05-31 18:53         ` Doug Evans [this message]
2012-06-01 19:38         ` Pedro Alves
2012-06-04  4:06           ` Doug Evans
2012-06-04 15:03             ` Pedro Alves
2012-06-19  0:58               ` Doug Evans
2012-07-19  9:18                 ` Andreas Schwab
2012-07-30 17:29                   ` dje
2012-07-31  7:19                     ` Sergio Durigan Junior
2012-08-01  5:18                       ` Sergio Durigan Junior
2012-08-01 19:30                         ` dje
2012-05-25 10:04     ` Matt Rice

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADPb22STGbUrVDMLpEiPkQVRZ6Mt84q5Sc4hynRYNS19vM_1Jw@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=ratmice@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox