Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: joern.rennecke@st.com
Cc: bje@redhat.com, gdb-patches@sources.redhat.com
Subject: Re: SH5 simulator contribution
Date: Mon, 29 Apr 2002 10:47:00 -0000	[thread overview]
Message-ID: <3CCD874A.8010801@cygnus.com> (raw)
In-Reply-To: <3CCD81CD.CBAC3A62@st.com>


>> >> Formalizing would be a better word.  So that GDB and the SIM can agree
>> >> on the register numbers and their sizes without needing to know the
>> >> others internals.
> 
>> >
>> >
>> > They only need to know if the program is for an sh5 or an earlier processor.
>> > This information is readily available from the elf flags (the lower five bits
> 
>> Having just looked at a different target (similar problem), I think
>> having a single file that assigns different number ranges to the sh4 vs
>> sh64 registers would be best.  That would make it easy to detect things
>> like trying to fetch an SH64 register from the SH4 sim.
> 
> 
> Using the current raw / pseudo-register distinction, that would lead to funny
> artifacts: the sh and sh64 raw registers would all come first, and only then
> the can the pseudo registers follow.

Um, these sim register numbers are separate to GDB's internal ``raw'' 
registers (and don't have anything to do with pseudo-registers).  GDB 
will need to map any internal register number onto the published sim 
register number before fetching a sim register.

Given an enum

	sim_sh_regnum {
	... sim_sh64_r0, ...sim_sh_r0, ...
	}

(who knows if r0 exists on the sh).  If GDB thinks it is talking to an 
sh64 sim it would ask for ``sim_sh64_r0'', on the other hand if it 
things it is talking to an SH4 or prior, it would ask for sim_sh_r0.

If GDB and SIM think differently (one is sh64 and the other is SH) then, 
I think, the only immediate objective is to not dump core.

Andrew


  reply	other threads:[~2002-04-29 17:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-02  2:06 Ben Elliston
2002-02-04 19:48 ` Andrew Cagney
2002-02-04 20:28   ` Ben Elliston
2002-02-04 20:59     ` Andrew Cagney
2002-02-04 22:29       ` Ben Elliston
2002-02-05  8:31         ` Andrew Cagney
2002-02-05 12:21           ` Ben Elliston
2002-02-05 17:36             ` Andrew Cagney
2002-04-12  2:46               ` Joern Rennecke
2002-04-12  9:30                 ` Andrew Cagney
2002-04-12  9:45                 ` Andrew Cagney
2002-04-15  1:48                   ` Joern Rennecke
2002-04-18 18:32                     ` Andrew Cagney
2002-04-29 10:23                       ` Joern Rennecke
2002-04-29 10:47                         ` Andrew Cagney [this message]
2002-04-29 11:30                           ` Joern Rennecke
2002-04-12  2:48               ` Joern Rennecke
2002-04-12  2:57               ` Joern Rennecke
2002-04-12  2:57               ` Joern Rennecke
2002-04-12  2:57               ` Joern Rennecke
2002-04-12  2:58               ` Joern Rennecke

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=3CCD874A.8010801@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=bje@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=joern.rennecke@st.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