public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Andrew Burgess <aburgess@redhat.com>,
	 Simon Marchi <simon.marchi@efficios.com>,
	 Simon Marchi <simon.marchi@polymtl.ca>
Subject: Re: [PATCH v2] gdb/dwarf: dump cooked index contents in cooked_index_functions::dump
Date: Tue, 31 Jan 2023 07:19:20 -0700	[thread overview]
Message-ID: <87ilgmn5w7.fsf@tromey.com> (raw)
In-Reply-To: <03ff1644-df3d-2e6b-f2aa-49767abc580b@polymtl.ca> (Simon Marchi via Gdb-patches's message of "Mon, 30 Jan 2023 22:06:44 -0500")

>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> See the patch below for a quick prototype.
Simon> quick_symbol_functions::read_partial_symbols now returns a bool, and if
Simon> it returns false (failure), objfile::require_partial_symbols removes
Simon> that quick symbol instance from the qf list.

I'm working to get rid of this lazy symbol stuff.  So I'd rather not add
another meaning to it.  You can see the WIP on t/bg-dwarf-reading, but
the basic idea is that instead of delaying the reading of DWARF, start
the reading early and just delay the completion of it.  I haven't sent
this yet because it currently crashes, I think it will benefit from
being rebased on the write-index-in-background patch.

All the other methods in cooked_index_functions already do:

  dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
  if (per_objfile->per_bfd->index_table == nullptr)
    return;

So maybe this would be an ok choice for dump.

As an aside the code is doing:

  if (per_bfd->index_table == nullptr)
    return nullptr;
  cooked_index_vector *table
    = (gdb::checked_static_cast<cooked_index_vector *>
       (per_bfd->index_table.get ()));

It seems to me that it would be fine if checked_static_cast passed
through null in this case -- that is, do not assert when the result is
null if the parameter is also null.

Tom

  parent reply	other threads:[~2023-01-31 14:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 16:03 Simon Marchi
2023-01-30 16:08 ` Simon Marchi
2023-01-30 19:07 ` Tom Tromey
2023-01-30 20:08   ` Simon Marchi
2023-01-30 21:35 ` Andrew Burgess
2023-01-31  3:06   ` Simon Marchi
2023-01-31  9:21     ` Andrew Burgess
2023-01-31 15:49       ` Simon Marchi
2023-01-31 17:27         ` Tom Tromey
2023-01-31 14:19     ` Tom Tromey [this message]
2023-01-31 15:35       ` Simon Marchi

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=87ilgmn5w7.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@efficios.com \
    --cc=simon.marchi@polymtl.ca \
    /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).