public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "mark at klomp dot org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/23504] index cache: Produce and consume DWARF5 format
Date: Wed, 24 Feb 2021 14:22:18 +0000	[thread overview]
Message-ID: <bug-23504-4717-sOzPDUGlX4@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-23504-4717@http.sourceware.org/bugzilla/>

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

--- Comment #5 from Mark Wielaard <mark at klomp dot org> ---
(In reply to Tom Tromey from comment #4)
> The context here is GDB generating an index and putting it into the index
> cache.  .debug_names refers to symbol names using their index in .debug_str,
> so if a string does not appear there, then how would GDB cope?
> Currently I think it writes out a new .debug_str section, but of course
> (see the other PR), what's currently done is wrong; and also this seemed
> weird for the index cache, because in that scenario nobody is rewriting
> the original object file.
> 
> Not sure if this is clear or not...

It is clear, I just don't know enough about the index cache to understand which
design makes most sense. It seems for strings you need some way to tell which
section they came from, either .debug_string (the default), .debug_info (for
DW_FORM_string, if the index already associates a DIE offset with that, maybe
just have a flag that it looks up the DW_AT_name there?) and .debug_line_str
(DW_FORM_line_str) for those symbols which have a name that also represents a
file/path (dunno how to easily represent that). And then there are the
DW_FORM_strp_sup/DW_FORM_GNU_strp_alt strings (then the .debug_strp is in
another file...).

I think the summary is that DWARF5 got a lot of ways to store a string :)

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

  parent reply	other threads:[~2021-02-24 14:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-23504-4717@http.sourceware.org/bugzilla/>
2020-11-12 15:49 ` tromey at sourceware dot org
2021-02-21 22:33 ` tromey at sourceware dot org
2021-02-21 22:48 ` mark at klomp dot org
2021-02-22  2:27 ` tromey at sourceware dot org
2021-02-22  2:36 ` tromey at sourceware dot org
2021-02-24 14:22 ` mark at klomp dot org [this message]
2021-03-28 16:15 ` tromey at sourceware dot org
2021-03-28 19:41 ` tromey at sourceware dot org
2021-03-29 15:51 ` tromey at sourceware dot org
2022-04-22 18:36 ` tromey at sourceware dot org
2022-09-20 22:41 ` tromey at sourceware dot org
2023-12-10 15:17 ` tromey at sourceware dot org
2023-12-10 15:31 ` tromey at sourceware dot org
2023-12-10 15:51 ` tromey at sourceware dot org
2024-01-18 20:38 ` tromey at sourceware dot org
2024-02-09 20:04 ` tromey at sourceware dot org

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=bug-23504-4717-sOzPDUGlX4@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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).