public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: Tom Tromey <tom@tromey.com>,  gdb-patches@sourceware.org
Subject: Re: [RFC][gdb/symtab] Add DW_IDX_GNU_main_subprogram
Date: Wed, 24 Feb 2021 13:46:08 -0700	[thread overview]
Message-ID: <87sg5lyz1r.fsf@tromey.com> (raw)
In-Reply-To: <063bff26-f377-6e50-b1ce-d9e74b2d37cf@suse.de> (Tom de Vries's message of "Mon, 8 Feb 2021 12:46:56 +0100")

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> I tried fixing this by adding a GNU extension DW_IDX_GNU_main_subprogram
Tom> to .debug_names.

Nice idea.

Tom> Fix this by adding a GNU extension DW_IDX_GNU_main_subprogram to the name
Tom> index attributes, encoded using a number in the DW_IDX_lo_user-DW_IDX_hi_user
Tom> range.

It seems unfortunate to have to read most of the index entries in order
to find this at startup.  How much slowdown does it cause?

Tom> +      /* Set main name and language.  */
Tom> +      for (int i = 0; i < per_bfd->debug_names_table->name_count; ++i)
Tom> +	{
Tom> +	  const auto &map = *per_bfd->debug_names_table;

It seems like this could be hoisted out of the loop and then also used
in the loop header.

Tom

  reply	other threads:[~2021-02-24 20:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-29 15:47 [PATCH][gdb/testsuite] Add KFAILs for PR symtab/24549 Tom de Vries
2021-02-05 15:25 ` Tom Tromey
2021-02-05 17:28   ` Tom de Vries
2021-02-08 11:46     ` [RFC][gdb/symtab] Add DW_IDX_GNU_main_subprogram Tom de Vries
2021-02-24 20:46       ` Tom Tromey [this message]
2021-02-24 20:51         ` Tom Tromey
2021-03-02  1:44       ` Tom Tromey
2021-03-02  6:49         ` Tom de Vries
2021-03-02 15:01           ` Tom Tromey

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=87sg5lyz1r.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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).