Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: DJ Delorie <dj@redhat.com>
Cc: gdb@sourceware.org
Subject: Re: is sim/common documented anywhere?
Date: Sat, 25 Aug 2012 05:32:00 -0000	[thread overview]
Message-ID: <201208250132.27731.vapier@gentoo.org> (raw)
In-Reply-To: <201208250049.q7P0na0W023779@greed.delorie.com>

[-- Attachment #1: Type: Text/Plain, Size: 1087 bytes --]

On Friday 24 August 2012 20:49:36 DJ Delorie wrote:
> Problem turned out to be this: running "make all-sim" doesn't return
> an error if your compilation fails, at least on my system.

weird ... it does for me.  i don't think the rules added by the common make 
fragments swallow any errors ...

> I've now gotten to the point where sim_engine_run() is called.  I
> assume this is where I put the actual core simulation?

yes & no.  i think the core of the sim_engine_run loop is best left simple:

void
sim_engine_run (SIM_DESC sd,
                int next_cpu_nr, /* ignore  */
                int nr_cpus, /* ignore  */  
                int siggnal) /* ignore  */
{
  SIM_CPU *cpu;

  SIM_ASSERT (STATE_MAGIC (sd) == SIM_MAGIC_NUMBER);

  cpu = STATE_CPU (sd, 0);

  while (1)
    {
      step_once (cpu);
      if (sim_events_tick (sd))
        sim_events_process (sd);
    }
}

feel free to call "step_once" whatever you want -- there doesn't appear to be 
consistency atm.  but that func is where you'd put all the decode+execute 
logic.
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2012-08-25  5:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22 22:58 DJ Delorie
2012-08-22 23:23 ` Mike Frysinger
2012-08-22 23:42   ` DJ Delorie
2012-08-23  1:12     ` Mike Frysinger
2012-08-24 20:04       ` DJ Delorie
2012-08-24 22:10         ` Mike Frysinger
2012-08-25  0:50           ` DJ Delorie
2012-08-25  5:32             ` Mike Frysinger [this message]

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=201208250132.27731.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=dj@redhat.com \
    --cc=gdb@sourceware.org \
    /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