public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: William Tambe <tambewilliam@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Best way to check whether the "sim" is running standalone or by GDB
Date: Fri, 30 Aug 2019 16:02:00 -0000	[thread overview]
Message-ID: <fe20f6d2-6f26-6d31-a7eb-ef2c39cdd89a@redhat.com> (raw)
In-Reply-To: <CAF8i9mOR--quVcm9ByGLDgX-TFzPU_vvXhgHGGMe-C_r1fi8Dw@mail.gmail.com>

Hi William,

> What constitute the standalone code ?> 
> in fact, to port the simulator, I only had to implement the following:
> sim_engine_run ()
> sim_open ()
> sim_create_inferior ()
> 
> All the above functions are both used when the sim is running
> "standalone" or by "GDB".
> 
> Is there another function I can define that will only be used when the
> sim is running "standalone" ?

Presumably you are using a Makefile.in like the other simulators.
In there you define SIM_RUN_OBJS to contain the object files that
are only part of the standalone simulator.  So you could use a 
function in one of those object files.  main() would be the obvious
choice, if you are using your own.  Or else something called from
the main() defined in common/nrun.c.

Cheers
  Nick


  reply	other threads:[~2019-08-30 16:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29  2:15 William Tambe
2019-08-29 18:05 ` William Tambe
2019-08-30  9:54   ` Nick Clifton
2019-08-30 15:24     ` William Tambe
2019-08-30 16:02       ` Nick Clifton [this message]
2021-01-15  6:04 ` Mike Frysinger
2019-09-03 19:26 Michael Morrell

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=fe20f6d2-6f26-6d31-a7eb-ef2c39cdd89a@redhat.com \
    --to=nickc@redhat.com \
    --cc=gdb@sourceware.org \
    --cc=tambewilliam@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).