From: Will Cohen <wcohen@redhat.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Patch to provide m68k simulator to gdb
Date: Mon, 05 Mar 2001 13:25:00 -0000 [thread overview]
Message-ID: <3AA40408.1A30B245@redhat.com> (raw)
In-Reply-To: <3A9D2941.ECA95C7E@cygnus.com>
I have revised the code to avoid hard coded constants for the register
numbers. The register numbers are defined in sim-main.h.
---
There are a number of depreciated routines in the current
implementation. These will have to be reworked. Would it be possible
to check in the m68k simulator into the GDB source tree and then upgrade
the simulator interface to the current implementation?
-Will
Andrew Cagney wrote:
>
> Below are some quick comment about things that are often missed when
> integrating a new simulator.
>
> --
>
> New simulators use a header file (include/sim-XXX.h - eg
> include/sim-d10v.h) as a way of avoiding magic numbers like:
>
> sim_fetch_register()
>
> + case 0: case 1: case 2: case 3: case 4: case 5: case 6:
> case 7:
> + /* address regs "a0", "a1", "a2", "a3", "a4", "a5", "fp", "sp"
> */
> + case 8: case 9: case 10: case 11: case 12: case 13: case 14:
> case 15:
> + val = saved_state.regs[rn];
>
> That header along with REGISTER_SIM_REGNO() make it possible to decouple
> the simulators register numbers from GDBs. Could the code please be
> changed to at least use the header file.
>
> --
>
> I have a feeling that this code is implementing a number of
> older/deprecated methods. Have a look over include/remote-sim.h where
> it clearly identifies deprecated interfaces. For instance:
>
> /* Single-step simulator with tracing enabled.
> THIS PROCEDURE IS DEPRECIATED.
> THIS PROCEDURE IS EVEN MORE DEPRECATED THAN SIM_SET_TRACE
> GDB and NRUN do not use this interface.
>
> Make certain that you use `nrun.c'' and not the older ``run.c''. Add
> the line:
>
> # List of main object files for `run'.
> SIM_RUN_OBJS = nrun.o
>
> to your Makefile.in. It is probably why you implemented sim_trace()
> et.al.
>
> Andrew
next prev parent reply other threads:[~2001-03-05 13:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-27 14:59 Will Cohen
2001-02-27 15:35 ` J.T. Conklin
2001-02-28 8:02 ` Andrew Cagney
2001-02-28 8:58 ` Will Cohen
2001-02-28 9:17 ` Andrew Cagney
2001-03-05 13:12 ` Will Cohen
2001-02-28 8:39 ` Andrew Cagney
2001-02-28 9:01 ` Will Cohen
2001-03-01 11:24 ` Will Cohen
2001-03-01 11:54 ` Andrew Cagney
2001-03-05 13:25 ` Will Cohen [this message]
2001-03-05 14:57 ` Andrew Cagney
2001-03-06 8:22 ` Will Cohen
2001-03-06 10:07 ` Frank Ch. Eigler
2001-03-09 12:54 ` Andrew Cagney
2001-03-05 15:12 ` Andrew Cagney
2001-03-06 10:11 ` Frank Ch. Eigler
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=3AA40408.1A30B245@redhat.com \
--to=wcohen@redhat.com \
--cc=ac131313@cygnus.com \
--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