public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simark@simark.ca>
Cc: Tom Tromey <tom@tromey.com>,  gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix line table regression
Date: Fri, 17 Mar 2023 16:17:36 -0600	[thread overview]
Message-ID: <87v8izaupr.fsf@tromey.com> (raw)
In-Reply-To: <822a503a-66fb-fcef-ce9f-3eb0628d6697@simark.ca> (Simon Marchi's message of "Fri, 17 Mar 2023 11:21:39 -0400")

>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:

Simon> It does fix the issue in do_mixed_source_and_assembly I have seen.

I'm going to check it in.

Simon> I like the idea of having a separate type to catch things at compile
Simon> time.  I would like for it to be used in other objects using unrelocated
Simon> addresses.

I'll take a quick look.

Simon> I'm just afraid that some code paths will always need to be
Simon> handle both relocated and unrelocated addresses, so the distinction
Simon> may not always be completely clear cut.  For instance, your patch shows
Simon> that gdbarch_addr_bits_remove works with both relocated and relocated
Simon> addresses.

Yeah.  The contract on some of these things is a bit vague for my taste,
as well.

Simon> If this becomes more widespread, I think it would be nice to have some
Simon> helper methods like this:

Simon>   unrelocated_addr objfile::unrelocated (CORE_ADDR);
Simon>   CORE_ADDR objfile::relocate (unrelocated_addr);

Simon> It would make the code a bit clearer about what the intention is, versus
Simon> just doing additions and subtractions.

I think they'd have to take the section index as well, but yeah.

Tom

      reply	other threads:[~2023-03-17 22:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 13:14 Tom Tromey
2023-03-17 15:21 ` Simon Marchi
2023-03-17 22:17   ` Tom Tromey [this message]

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=87v8izaupr.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simark@simark.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).