public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: vlad.ivanov@lab-systems.ru (Vlad Ivanov)
Cc: schwab@suse.de (schwab@suse.de),
	       gdb-patches@sourceware.org (gdb-patches@sourceware.org)
Subject: Re: [PATCH] gdbarch: Add pc_signed field and use it when adjusting BP addresses
Date: Thu, 15 Mar 2018 14:06:00 -0000	[thread overview]
Message-ID: <20180315140624.DEEACD804A7@oc3748833570.ibm.com> (raw)
In-Reply-To: <604111521119420@web34o.yandex.ru> from "Vlad Ivanov" at Mar 15, 2018 04:10:20 PM

Vlad Ivanov wrote:
> 15.03.2018, 15:59, "Ulrich Weigand" <uweigand@de.ibm.com>:
> > If the address is already correct, why don't you simply set
> > gdbarch_significant_addr_bit
> > to 64 in the mips back-end instead of adding a new gdbarch routine?
> 
> That would affect address printing.

I don't see how it can affect address printing.  gdbarch_significant_addr_bit
is not involved in that at all.

> Moreover, semantically it's 
> probably not a good practice because the code would imply that for 
> all kind of MIPS all 64 bits of address are significant, whereas
> in reality it differs from target to target.

Well, all 64 bits *are* significant in the relevant sense here.
"Significant" here only means, the bit already has the correct value
that it needs to have if you want to access the intended memory word
via ptrace.

The only reason to ever set gdbarch_significant_addr_bit to anything
less than the host word size is if addresses contain some tags or
other extraneous bits that actively need to be trimmed.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com

  reply	other threads:[~2018-03-15 14:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15 11:22 vlad.ivanov
2018-03-15 11:34 ` Andreas Schwab
2018-03-15 11:36   ` Vlad Ivanov
2018-03-15 12:59     ` Ulrich Weigand
2018-03-15 13:10       ` Vlad Ivanov
2018-03-15 14:06         ` Ulrich Weigand [this message]
2018-03-15 14:23           ` Vlad Ivanov
2018-03-19 14:14       ` Maciej W. Rozycki
2018-03-19 14:29         ` Ulrich Weigand
2018-03-15 13:46     ` Andreas Schwab
2018-03-15 13:56       ` Vlad Ivanov
2018-03-15 11:43   ` Vlad Ivanov

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=20180315140624.DEEACD804A7@oc3748833570.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=schwab@suse.de \
    --cc=vlad.ivanov@lab-systems.ru \
    /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).