Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Volkov <Andrew.Volkov@transas.com>
To: "D.Venkatasubramanian, Noida" <dvenkat@noida.hcltech.com>,
	Kazu Hirata <kazu@cs.umass.edu>, Petr Ledvina <ledvinap@n.cz>
Cc: gnuh8@gnuh8.org.uk, gdb@sources.redhat.com
Subject: RE: Adding MAC registers on H8300 Simulator [H8S/2600]
Date: Thu, 20 Feb 2003 18:28:00 -0000	[thread overview]
Message-ID: <2E74F312D6980D459F3A05492BA40F8D01F65962@clue.transas.com> (raw)

Hi, all

Peoples, at first, please look in file include/gdb/sim-h8300.h, This file 
(more then half year ago old) ALREADY contain MACH and MACL numbers. 
And also contain some useful constants too, i.e. SIM_H8300_NUM_COMMON_REGS, 
SIM_H8300_S_NUM_REGS, SIM_H8300_NUM_REGS.

> > As the H8S/2600 CPU has MAC registers, specifically
> > MACH and MACL, I added them to the H8300 Simulator. How
> > do I make GDB recognize these registers, more
> > specifically, what are the files that need to be
> > modified?

sim/h8300/compile.c (IMHO, better rewrite it from scratch ;) and
gdb/h8300-tdep.c
Also look  at multiarch patch from 2002-08-06 in gdb-patches archive
(It was not accepted and replaced by Corina's multiarch patch). Also, 
if you have much time, very best way is write model for cgen.

> in target definition, NUM_REGS specifies how many registers gdb uses.
> REGISTER_NAME return name of given register.
> This vector already contains special registers (cycles, inst, 
> .. ), so it
> should be possible to add new registers.
> gdbstub needs to only know register index mapping, so adding 
> new registers
> to end of this list should be compatible.
>
> Also check cvs log, someone (Andrew Volkov?) added exr 
> register recently
> to simulator, so he could know better.
> 
> > Also, how do I make these registers conditionally
> > displayed on GDB when the CPU is H8S/2600.
> IIRC gdb knows only h8s target, so this could be quite difficult.

Kazu, this question to you, remember our chat about new BFD target for
h8s/2600?
I dont't add real MAC support to simulator, 'cause bumped same problem,
only one solution I found - command to enable/disable MAC directly :(.

Andrey Volkov


             reply	other threads:[~2003-02-20 18:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-20 18:28 Andrew Volkov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-02-22  8:51 D.Venkatasubramanian, Noida
2003-02-20 15:35 D.Venkatasubramanian, Noida
2003-02-20 16:18 ` Petr Ledvina
2003-03-12 21:24 ` Michael Snyder

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=2E74F312D6980D459F3A05492BA40F8D01F65962@clue.transas.com \
    --to=andrew.volkov@transas.com \
    --cc=dvenkat@noida.hcltech.com \
    --cc=gdb@sources.redhat.com \
    --cc=gnuh8@gnuh8.org.uk \
    --cc=kazu@cs.umass.edu \
    --cc=ledvinap@n.cz \
    /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