public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug rust/30116] New: "start" fails for Rust with new DWARF indexer
@ 2023-02-12 16:25 tromey at sourceware dot org
  2023-02-12 16:25 ` [Bug rust/30116] " tromey at sourceware dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: tromey at sourceware dot org @ 2023-02-12 16:25 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=30116

            Bug ID: 30116
           Summary: "start" fails for Rust with new DWARF indexer
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: rust
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at sourceware dot org
  Target Milestone: ---

On irc, Iain Buclaw pointed out that the new DWARF indexer
broke "start" for D.  This is easily fixed, but more testing
showed that it also broke Rust.

It's not entirely trivial to fix.  The issue is that in
dwarf2_build_psymtabs_hard:

  const cooked_index_entry *main_entry = vec->get_main ();
  if (main_entry != nullptr)
    set_objfile_main_name (objfile, main_entry->name,
                           main_entry->per_cu->lang ());

... here we'd like to use the entry's full name.
But, the entry hasn't been canonicalized yet, so doing this
would actually crash.

Note though that Rust doesn't require canonicalization.
And, the languages that do require canonicalization don't
need this mechanism for finding "main".
So, I think at least for now we could have a hack to handle this.

Longer term, perhaps resurrecting an old patch of mine to
make "main"-finding more lazy (lookup on first use) would be
good.  This way the index could be "clean" and wait for the
finalization to be done, while not pausing the UI in the normal
case... the problem with the current code being that for
"gdb exe", gdb eagerly wants to set the current language, but
really this could be done on demand.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-18 23:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-12 16:25 [Bug rust/30116] New: "start" fails for Rust with new DWARF indexer tromey at sourceware dot org
2023-02-12 16:25 ` [Bug rust/30116] " tromey at sourceware dot org
2023-02-14  0:39 ` tromey at sourceware dot org
2023-02-18 23:22 ` cvs-commit at gcc dot gnu.org
2023-02-18 23:30 ` cvs-commit at gcc dot gnu.org
2023-02-18 23:31 ` tromey at sourceware dot org

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).