From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: macro@mips.com (Maciej W. Rozycki)
Cc: yao.qi@linaro.org (Yao Qi),
vlad.ivanov@lab-systems.ru (Vlad Ivanov),
schwab@suse.de (Andreas Schwab),
gdb-patches@sourceware.org (gdb-patches@sourceware.org)
Subject: Re: [PATCH] gdbarch: Add pc_signed field and use it when adjusting BP addresses
Date: Mon, 19 Mar 2018 14:29:00 -0000 [thread overview]
Message-ID: <20180319142900.1D31FD804A7@oc3748833570.ibm.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1803191355490.2163@tp.orcam.me.uk> from "Maciej W. Rozycki" at Mar 19, 2018 02:08:44 PM
Maciej W. Rozycki wrote:
> On Thu, 15 Mar 2018, Ulrich Weigand wrote:
>
> > > MIPS backend already returns a sign-extended value, and address_significant
> > > cuts out bits 63 to 32. This makes breakpoint address comparison in step
> > > routines to misbehave.
> >
> > 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?
>
> I think it's the default from commit a738ea1d41da ("Clear non-significant
> bits of address on memory access") that is wrong. The default is set to
> `gdbarch_addr_bit (gdbarch)'. Instead I think it should be set to the BFD
> VMA width, i.e. `8 * sizeof (bfd_vma)' or suchlike, so that the internal
> representation does not get truncated inadvertently.
Good point. I agree it makes sense to change the default here.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU/Linux compilers and toolchain
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2018-03-19 14:29 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
2018-03-15 14:23 ` Vlad Ivanov
2018-03-19 14:14 ` Maciej W. Rozycki
2018-03-19 14:29 ` Ulrich Weigand [this message]
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=20180319142900.1D31FD804A7@oc3748833570.ibm.com \
--to=uweigand@de.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=macro@mips.com \
--cc=schwab@suse.de \
--cc=vlad.ivanov@lab-systems.ru \
--cc=yao.qi@linaro.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).