Best way to check whether the "sim" is running standalone or by GDB
Nick Clifton
nickc@redhat.com
Fri Aug 30 09:54:00 GMT 2019
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
More information about the Gdb
mailing list