Re: Best way to check whether the "sim" is running standalone or by GDB
Nick Clifton <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
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