Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch+7.3] gdbindex regression: stabs forgotten  [Fix crash of gdb save-index on a STABS file]
Date: Mon, 18 Apr 2011 17:31:00 -0000	[thread overview]
Message-ID: <m3sjtf79g6.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20110417163126.GA23189@host1.jankratochvil.net> (Jan	Kratochvil's message of "Sun, 17 Apr 2011 18:31:26 +0200")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Tom> On the reader side, the code in elfread.c is written to read STABS
Tom> first -- and skip using the index if any are found.  This handles the
Tom> problem that an objfile can only have one set of quick functions.

Jan> I do not see it implemented.  This is a regression.

I must have dropped something somewhere along the line, oops.
Or maybe I just botched the logic when I added lazy psymtabs.

Jan>    if (dwarf2_has_info (objfile))
Jan>      {
Jan> -      if (dwarf2_initialize_objfile (objfile))
Jan> +      /* elf_sym_fns_gdb_index cannot handle simultaneous non-DWARF debug
Jan> +	 information present in OBJFILE.  If there is such debug info present
Jan> +	 never use .gdb_index.  */
Jan> +
Jan> +      if (!objfile_has_partial_symbols (objfile)
Jan> +	  && dwarf2_initialize_objfile (objfile))

This makes the case of "stabs, plus gnu index, plus -readnow" a little
worse.  

It is hard to imagine anybody caring about this kind of thing though.
I just thought it was funny.

Jan>    /* If we have not read psymbols, but we have a function capable of
Jan>       reading them, then that is an indication that they are in fact
Jan>       available.  */
Jan> -  if ((objfile->flags & OBJF_PSYMTABS_READ) == 0)
Jan> -    return objfile->sf->sym_read_psymbols != NULL;
Jan> +  if ((objfile->flags & OBJF_PSYMTABS_READ) == 0
Jan> +      && objfile->sf->sym_read_psymbols != NULL)
Jan> +    return 1;

I think this change requires an update to the comment and also maybe to
the corresponding comment in symfile.h.

Tom


  reply	other threads:[~2011-04-18 17:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-09 15:23 [commit] Fix crash of gdb save-index on a STABS file Jan Kratochvil
2011-04-14 20:44 ` Tom Tromey
2011-04-17 16:32   ` [patch+7.3] gdbindex regression: stabs forgotten [Fix crash of gdb save-index on a STABS file] Jan Kratochvil
2011-04-18 17:31     ` Tom Tromey [this message]
2011-04-23  4:53       ` [wrong patch] Re: [patch+7.3] gdbindex regression: stabs forgotten Jan Kratochvil
2011-04-25 16:02         ` Tom Tromey
2011-04-23  5:15       ` Jan Kratochvil
2011-04-25 16:03         ` Tom Tromey
2011-04-25 19:41           ` Jan Kratochvil
2011-04-25 20:49             ` Joel Brobecker
2011-04-25 21:28               ` Jan Kratochvil

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=m3sjtf79g6.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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