From: "Kei Sakamoto" <sakamoto.kei@renesas.com>
To: "Daniel Jacobowitz" <drow@false.org>
Cc: <gdb-patches@sources.redhat.com>
Subject: Re: [RFA/m32r] Fix breakpoint bug
Date: Tue, 26 Oct 2004 05:45:00 -0000 [thread overview]
Message-ID: <002001c4bb1f$20031630$5169910a@E5A02646> (raw)
In-Reply-To: <20041025153816.GA28488@nevyn.them.org>
> I'm curious about the little endian case:
>
> + else /* little-endian */
> + {
> + if ((addr & 3) == 0)
> + {
> + buf[0] = contents_cache[0];
> + buf[1] = contents_cache[1] & 0x7f;
> + buf[2] = bp_entry[1];
> + buf[3] = bp_entry[0];
> }
>
> Shouldn't the breakpoint be placed at buf[0] here rather than buf[2]?
For most of architectures - yes, it shold be at buf[0]. But the little endian
mode of M32R is a kind of unique.
In other architectures, two 16-bit instructions, A and B, are placed as
the following:
Big endian:
A0 A1 B0 B1
Little endian:
A1 A0 B1 B0
In M32R, they are placed like this:
Big endian:
A0 A1 B0 B1
Little endian:
B1 B0 A1 A0
This is because M32R always fetches instructions in 32-bit.
So the breakpoint should be placed at buf[2].
Kei Sakamoto
next prev parent reply other threads:[~2004-10-26 5:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-07 6:32 Kei Sakamoto
2004-10-18 6:43 ` [RFA/m32r] Unreviewed patch (breakpoint bug) Kei Sakamoto
2004-10-25 9:02 ` Kei Sakamoto
2004-11-01 1:08 ` Kei Sakamoto
2004-10-25 16:19 ` [RFA/m32r] Fix breakpoint bug Daniel Jacobowitz
2004-10-26 5:45 ` Kei Sakamoto [this message]
2004-11-04 0:21 ` Andrew Cagney
2004-11-04 0:50 ` Kei Sakamoto
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='002001c4bb1f$20031630$5169910a@E5A02646' \
--to=sakamoto.kei@renesas.com \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
/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