diff options
author | Stan Shebs <shebs@codesourcery.com> | 1999-04-26 18:34:20 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 1999-04-26 18:34:20 +0000 |
commit | 7a292a7adf506b866905b06b3024c0fd411c4583 (patch) | |
tree | 5b208bb48269b8a82d5c3a5f19c87b45a62a22f4 /sim/mn10200/interp.c | |
parent | 1996fae84682e8ddd146215dd2959ad1ec924c09 (diff) | |
download | gdb-7a292a7adf506b866905b06b3024c0fd411c4583.zip gdb-7a292a7adf506b866905b06b3024c0fd411c4583.tar.gz gdb-7a292a7adf506b866905b06b3024c0fd411c4583.tar.bz2 |
import gdb-19990422 snapshot
Diffstat (limited to 'sim/mn10200/interp.c')
-rw-r--r-- | sim/mn10200/interp.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/sim/mn10200/interp.c b/sim/mn10200/interp.c index df95b7c..43a8750 100644 --- a/sim/mn10200/interp.c +++ b/sim/mn10200/interp.c @@ -4,6 +4,17 @@ #include "mn10200_sim.h" +#ifdef NEED_UI_LOOP_HOOK +/* How often to run the ui_loop update, when in use */ +#define UI_LOOP_POLL_INTERVAL 0x60000 + +/* Counter for the ui_loop_hook update */ +static long ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL; + +/* Actual hook to call to run through gdb's gui event loop */ +extern int (*ui_loop_hook) (int); +#endif /* NEED_UI_LOOP_HOOK */ + host_callback *mn10200_callback; int mn10200_debug; static SIM_OPEN_KIND sim_kind; @@ -292,7 +303,8 @@ int sim_stop (sd) SIM_DESC sd; { - return 0; + State.exception = SIGINT; + return 1; } void @@ -313,6 +325,14 @@ sim_resume (sd, step, siggnal) { unsigned long insn, extension; +#ifdef NEED_UI_LOOP_HOOK + if (ui_loop_hook != NULL && ui_loop_hook_counter-- < 0) + { + ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL; + ui_loop_hook (0); + } +#endif /* NEED_UI_LOOP_HOOK */ + /* Fetch the current instruction, fetch a double word to avoid redundant fetching for the common cases below. */ inst = load_mem_big (PC, 2); |