From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org, Bernd Edlinger <bernd.edlinger@hotmail.de>
Subject: Re: [PATCH] gdb: fix handling of DW_AT_entry_pc of inlined subroutines
Date: Thu, 17 Oct 2024 14:03:07 -0600 [thread overview]
Message-ID: <87y12mcxac.fsf@tromey.com> (raw)
In-Reply-To: <1484e0b351a60ab171896de1ca52d8da89b337d0.1729093223.git.aburgess@redhat.com> (Andrew Burgess's message of "Wed, 16 Oct 2024 16:47:38 +0100")
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> This commit extends the block class to carry the entry PC as a
Andrew> separate member variable. Then the DWARF reader is extended to read
Andrew> and set the entry PC for the block. Now in block::entry_pc(), if the
Andrew> entry PC has been set to a specific value, this is the value returned.
I wonder what the size cost is of adding a field to block -- I mean the
overall cost, not just sizeof(block).
But I suppose in the end it's not very important, since we normally
operate on the assumption that most CUs won't be expanded.
Andrew> CORE_ADDR entry_pc () const
Andrew> {
Andrew> - if (this->is_contiguous ())
Andrew> + if (m_entry_pc.has_value ())
Andrew> + return *m_entry_pc;
Andrew> + else if (this->is_contiguous ())
Andrew> return this->start ();
Andrew> else
Andrew> return this->ranges ()[0].start ();
Andrew> +
Andrew> + /* If set this is the entry PC for the block. */
Andrew> +
Andrew> + std::optional<CORE_ADDR> m_entry_pc;
Andrew> };
std::optional here means carrying an extra word for just the flag bit.
However I wonder if it would work to use CORE_ADDR here and use 0 as a
sentinel to mean unset; or some other scheme making it so the entry PC
and the 'start' are identical by default.
Tom
next prev parent reply other threads:[~2024-10-17 20:03 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 15:47 Andrew Burgess
2024-10-17 20:03 ` Tom Tromey [this message]
2024-10-18 10:06 ` Andrew Burgess
2024-10-18 13:57 ` Andrew Burgess
2024-10-18 10:26 ` Gerlicher, Klaus
2024-10-18 13:55 ` Andrew Burgess
2024-10-18 13:53 ` [PATCHv2] " Andrew Burgess
2024-10-28 13:45 ` [PATCHv3] " Andrew Burgess
2024-10-29 14:49 ` [PATCHv4] " Andrew Burgess
2024-10-29 15:28 ` Bernd Edlinger
2024-10-31 10:57 ` Andrew Burgess
2024-10-31 14:01 ` Bernd Edlinger
2024-10-31 14:56 ` Andrew Burgess
2024-10-29 16:34 ` Bernd Edlinger
2024-10-31 10:59 ` Andrew Burgess
2024-10-31 15:00 ` [PATCHv5] " Andrew Burgess
2024-11-01 18:13 ` Tom Tromey
2024-11-01 20:27 ` Bernd Edlinger
2024-11-05 11:25 ` Andrew Burgess
2024-11-05 15:26 ` Bernd Edlinger
2024-11-05 16:52 ` Andrew Burgess
2024-11-05 19:57 ` Bernd Edlinger
2024-11-05 11:21 ` [PATCHv6] " Andrew Burgess
2024-11-13 13:49 ` Andrew Burgess
2024-11-13 16:59 ` Andrew Burgess
2024-11-14 9:20 ` Tom de Vries
2024-11-14 19:33 ` Andrew Burgess
2024-11-15 8:50 ` Tom de Vries
2024-11-15 10:53 ` Bernd Edlinger
2024-11-15 14:00 ` Andrew Burgess
2024-11-15 14:30 ` Tom de Vries
2024-11-15 16:46 ` Andrew Burgess
2024-11-15 19:24 ` Andrew Burgess
2024-11-17 23:52 ` Bernd Edlinger
2024-11-19 9:29 ` Andrew Burgess
2024-11-15 17:00 ` Bernd Edlinger
2024-11-15 13:45 ` Andrew Burgess
2024-10-29 15:29 ` [PATCHv3] " Sam James
2024-10-31 9:48 ` Andrew Burgess
2024-10-18 14:24 ` [PATCH] " Bernd Edlinger
2024-10-28 13:26 ` Andrew Burgess
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=87y12mcxac.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.com \
--cc=bernd.edlinger@hotmail.de \
--cc=gdb-patches@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).