Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Kei Sakamoto <sakamoto.kei@renesas.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC/m32r] Add gdbserver support to m32r-linux
Date: Tue, 12 Apr 2005 12:16:00 -0000	[thread overview]
Message-ID: <20050412121626.GA7373@nevyn.them.org> (raw)
In-Reply-To: <016101c53f1d$67b40660$5169910a@E5A02646>

On Tue, Apr 12, 2005 at 02:06:17PM +0900, Kei Sakamoto wrote:
> +linux-m32r-low.o: linux-m32r-low.c $(linux_low_h) $(server_h) ../m32r-tdep.h

This doesn't seem to be necessary.

> +#define m32r_num_regs 25
> +
> +static int m32r_regmap[] = {
> +#ifdef PT_R0
> +  PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5, PT_R6, PT_R7,
> +  PT_R8, PT_R9, PT_R10, PT_R11, PT_R12, PT_FP, PT_LR, PT_SPU,
> +  PT_PSW, PT_CBR, PT_SPI, PT_SPU, PT_BPC, PT_PC, PT_ACCL, PT_ACCH, PT_EVB
> +#else
> +  4 * 4, 4 * 5, 4 * 6, 4 * 7, 4 * 0, 4 * 1, 4 * 2, 4 * 8,
> +  4 * 9, 4 * 10, 4 * 11, 4 * 12, 4 * 13, 4 * 24, 4 * 25, 4 * 23,
> +  4 * 19, 4 * 31, 4 * 26, 4 * 23, 4 * 20, 4 * 30, 4 * 16, 4 * 15, 4 * 32
> +#endif
> +};

You've got 25 regs here...

> +static int
> +m32r_cannot_store_register (int regno)
> +{
> +  return (regno >= m32r_num_regs);
> +}
> +
> +static int
> +m32r_cannot_fetch_register (int regno)
> +{
> +  return (regno >= m32r_num_regs);
> +}

And you allow storing to registers 0-24 here...

> Index: regformats/reg-m32r.dat
> ===================================================================
> RCS file: regformats/reg-m32r.dat
> diff -N regformats/reg-m32r.dat
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ regformats/reg-m32r.dat	12 Apr 2005 04:27:26 -0000
> @@ -0,0 +1,45 @@
> +name:m32r
> +expedite:pc,lr,sp
> +32:r0
> +32:r1
> +32:r2
> +32:r3
> +32:r4
> +32:r5
> +32:r6
> +32:r7
> +32:r8
> +32:r9
> +32:r10
> +32:r11
> +32:r12
> +32:fp
> +32:lr
> +32:sp
> +32:psw
> +32:cbr
> +32:spi
> +32:spu
> +32:bpc
> +32:pc
> +32:accl
> +32:acch

... but this is only 24; what about evb?

> +
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:
> +32:

Did you test without this padding?  If nothing follows it, I don't
believe the trailing padding is necessary.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


  reply	other threads:[~2005-04-12 12:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-12  5:03 Kei Sakamoto
2005-04-12 12:16 ` Daniel Jacobowitz [this message]
2005-04-13  8:01   ` Kei Sakamoto
2005-04-14 19:18     ` Daniel Jacobowitz
2005-04-15  0:30       ` 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=20050412121626.GA7373@nevyn.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=sakamoto.kei@renesas.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