From: Bernd Edlinger <bernd.edlinger@hotmail.de>
To: Andrew Burgess <aburgess@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCHv4] gdb: fix handling of DW_AT_entry_pc of inlined subroutines
Date: Tue, 29 Oct 2024 17:34:34 +0100 [thread overview]
Message-ID: <DU2PR08MB10263A3C068A89FD05EA995FEE44B2@DU2PR08MB10263.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <048adfb0b4dad045ffff2c71825bb2348c49e5ed.1730212638.git.aburgess@redhat.com>
On 10/29/24 15:49, Andrew Burgess wrote:
> @@ -344,6 +357,18 @@ struct block : public allocate_on_obstack<block>
> startaddr and endaddr above. */
>
> struct blockranges *m_ranges = nullptr;
> +
> + /* The entry address for this block. The value 0 is special and
> + indicates that the entry address has not been set.
> +
> + Using 0 as a special value is not ideal, targets for which 0 is a
> + valid code address might run into problems if they want to use 0 as a
> + block's entry address, but the alternative is to carry a flag
> + indicating if m_entry_pc is valid or not, but that would make 'struct
> + block' even bigger, and we want to keep 'struct block' as small as
> + possible (we might have a lot of blocks). */
> +
> + CORE_ADDR m_entry_pc = 0;
> };
>
Aehm, I've just had an idea how you can get this much simpler:
Instead of using an exceptional value, and fiddle with the later relocation steps,
you should simply store here the offset from ranges[0].start, or block.start
if no subranges, this is just a constant value, that just has to be added in
block.entry_pc(), 0 means just the current behavour, and if >0 it is always a
constant value, even after objfile relocation. That means there is no chance of any
special value that cannot be handled here, and a lot of complications can be avoided.
What do you think?
Thanks
Bernd.
next prev parent reply other threads:[~2024-10-29 16:33 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 15:47 [PATCH] " Andrew Burgess
2024-10-17 20:03 ` Tom Tromey
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 [this message]
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=DU2PR08MB10263A3C068A89FD05EA995FEE44B2@DU2PR08MB10263.eurprd08.prod.outlook.com \
--to=bernd.edlinger@hotmail.de \
--cc=aburgess@redhat.com \
--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).