public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Dodji Seketeli <dodji@redhat.com>,
	GDB/Archer list <archer@sourceware.org>
Subject: Re: [RFC] Proposal for a new DWARF name index section
Date: Mon, 10 Aug 2009 18:21:00 -0000	[thread overview]
Message-ID: <20090810182136.GA25301@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <m3y6pr8tbl.fsf@fleche.redhat.com>

On Mon, 10 Aug 2009 19:36:14 +0200, Tom Tromey wrote:
> but the reason to include this information in the index has to do with
> setting breakpoints, not with expression evaluation.
> 
> I don't think breakpoint setting should necessarily follow language
> rules.

OK, thanks for the clarification, forgot etc.

Still when thinking about it:
* I do not find the symbols reading much slow myself (working _on_ small GDB).
* People complaining it is slow usually use IDEs which use rather file:line
  based breakpoints, don't they?  (As it was discussed on RH IRC today.)
  = Assuming the C++ people do not put breakpoints on static out-of-scope
    functions by name.

For the latter case I agree a fix is needed but an index of static names will
not help with it.


> It is not uncommon for a program to have a uniquely-named static
> function.  It seems friendly to users to let them type "break func" in
> any context.

(One needs to think about same-name functions both static and global in
different files but sure it is unrelated to the new index.)


> Anyway, that is my logic.  Which part of this do you disagree with?
> Or, am I missing something else?

We have concluded the currently missing information is for:
* static functions (are they really needed for the file:line IDE usecases?)
* inlined functions which have no concrete out-of-line instance
  (the same file:line IDE usecase question)

IMO not for:
* static non-function symbols are deprecated (backward GDB compatibility only)


> There does not seem to be a big downside to introducing a new section
> that does exactly what we want.  It is automatically backward
> compatible.  It is (I believe) not difficult to implement.  And,
> finally, we can make it reliable by fiat.

While it is an improvement with existing .debug_pubnames, .debug_pubtypes and
.debug_aranges one can:

* Lookup everything in current CU which can is fully read-in from .debug_info.
* Always lookup global symbols from other CUs through the DWARF indexes.
* Fallback to the full read-in only for:
  * static functions in out of the language (compiler) scope
  * inlined functions which have no concrete out-of-line instance
  * reference to a non-existing symbol

archer-tromey-delayed-symfile could be probably more improved by properly
following the indexes.  While I did fix a regression I broke a performance by
my patch before, it could be probably patched better:
	[delayed-symfile] [commit] Fix a regression on forgotten delayed read of a type info.
	http://sourceware.org/ml/archer/2009-q1/msg00232.html


As a summary GDB could already give (with proper non-existing patches) in the
common usecases acceptable performance even based just on the existing DWARF
indexes, couldn't it?  I did not think so before this mail thread.



Thanks,
Jan

  reply	other threads:[~2009-08-10 18:21 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-10  9:04 Dodji Seketeli
2009-08-10 14:38 ` Jan Kratochvil
2009-08-10 17:36   ` Tom Tromey
2009-08-10 18:21     ` Jan Kratochvil [this message]
2009-08-11  7:55       ` Dodji Seketeli
2009-08-11 17:45         ` Jan Kratochvil
2009-08-11 22:43           ` Tom Tromey
2009-08-12 19:20             ` Jan Kratochvil
2009-08-11 22:29       ` Tom Tromey
2009-08-20 17:31 ` Dodji Seketeli
2009-11-17 23:46   ` Cary Coutant
2009-11-20 17:25     ` Tom Tromey
2009-11-22  4:39       ` Daniel Jacobowitz
2009-11-23 19:51         ` Tom Tromey
2009-12-01 19:14       ` Tom Tromey
2009-12-02  5:17         ` Daniel Jacobowitz
2009-12-02 17:07           ` Tom Tromey
2009-12-02 17:35             ` Daniel Jacobowitz
2009-12-02 19:23               ` Tom Tromey
2009-12-02 19:39                 ` Daniel Jacobowitz
2009-12-03  1:46                   ` Paul Pluzhnikov
2009-12-04 23:13                     ` Tom Tromey
2009-12-06  3:41                       ` Tom Tromey
2009-12-07 21:32                         ` Tom Tromey
2009-12-02 16:11         ` Dodji Seketeli
2009-12-02 17:29           ` Tom Tromey
2009-12-11 23:56     ` Tom Tromey
2009-12-12  0:06       ` Daniel Jacobowitz
2009-12-12  0:13       ` Cary Coutant
2009-12-13  3:48       ` Dodji Seketeli
2009-12-14 15:32       ` Dodji Seketeli

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=20090810182136.GA25301@host0.dyn.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=archer@sourceware.org \
    --cc=dodji@redhat.com \
    --cc=tromey@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).