From: William Tambe <tambewilliam@gmail.com>
To: Nick Clifton <nickc@redhat.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 15:24:00 -0000 [thread overview]
Message-ID: <CAF8i9mOR--quVcm9ByGLDgX-TFzPU_vvXhgHGGMe-C_r1fi8Dw@mail.gmail.com> (raw)
In-Reply-To: <93938d40-a91d-e5d6-7f20-70e683c23a97@redhat.com>
On Fri, Aug 30, 2019 at 4:54 AM Nick Clifton <nickc@redhat.com> wrote:
>
> Hi William,
>
> >> What is the best way to check whether the "sim" is running standalone
> >> or by GDB ?
>
> Possibly not the best way, but one way is to use a global variable to
> indicate the presence of the standalone driver. eg:
>
> int running_standalone = 0;
>
> ...
> if (! running_standalone)
> sim_engine_halt (sim_stopped, SIM_SIGTRAP);
>
> Then in your standalone code, initialise the variable to non-zero.
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" ?
>
> Cheers
> Nick
>
>
>
>
next prev parent reply other threads:[~2019-08-30 15:24 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 [this message]
2019-08-30 16:02 ` Nick Clifton
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=CAF8i9mOR--quVcm9ByGLDgX-TFzPU_vvXhgHGGMe-C_r1fi8Dw@mail.gmail.com \
--to=tambewilliam@gmail.com \
--cc=gdb@sourceware.org \
--cc=nickc@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).