public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: William Tambe <tambewilliam@gmail.com>, gdb@sourceware.org
Subject: Re: Best way to check whether the "sim" is running standalone or by GDB
Date: Fri, 30 Aug 2019 09:54:00 -0000	[thread overview]
Message-ID: <93938d40-a91d-e5d6-7f20-70e683c23a97@redhat.com> (raw)
In-Reply-To: <CAF8i9mN557u4oUij=LNk3VVQncsJzQrA5izghL3Be4He3Nbyog@mail.gmail.com>

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.

Cheers
  Nick




  reply	other threads:[~2019-08-30  9:54 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 [this message]
2019-08-30 15:24     ` William Tambe
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=93938d40-a91d-e5d6-7f20-70e683c23a97@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).