From 7a292a7adf506b866905b06b3024c0fd411c4583 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Mon, 26 Apr 1999 18:34:20 +0000 Subject: import gdb-19990422 snapshot --- sim/mn10200/ChangeLog | 15 +++++++++++++++ sim/mn10200/Makefile.in | 2 +- sim/mn10200/interp.c | 22 +++++++++++++++++++++- 3 files changed, 37 insertions(+), 2 deletions(-) (limited to 'sim/mn10200') diff --git a/sim/mn10200/ChangeLog b/sim/mn10200/ChangeLog index ce38f13..1eb7fbd 100644 --- a/sim/mn10200/ChangeLog +++ b/sim/mn10200/ChangeLog @@ -1,3 +1,18 @@ +1999-04-06 Keith Seitz + + * interp.c (sim_stop): Set the sim's exception + to SIGINT. + +1999-04-02 Keith Seitz + + * interp.c (UI_LOOP_POLL_INTERVAL): Define. Used to tweak the + frequency at which ui_loop_hook is called. + (ui_loop_hook_counter): New global defined when NEED_UI_LOOP_HOOK + is defined. + (sim_resume): Call ui_loop_hook (if defined) when the interval + passes. + * Makefile.in (SIM_EXTRA_CFLAGS): Include NEED_UI_LOOP_HOOK. + Wed Jun 17 11:37:59 1998 Mark Alexander * Makefile.in: Define NL_TARGET so that targ-vals.h will be used diff --git a/sim/mn10200/Makefile.in b/sim/mn10200/Makefile.in index dd9581c..e19d9e7 100644 --- a/sim/mn10200/Makefile.in +++ b/sim/mn10200/Makefile.in @@ -19,7 +19,7 @@ ## COMMON_PRE_CONFIG_FRAG SIM_OBJS = interp.o table.o simops.o sim-load.o -SIM_EXTRA_CFLAGS = -I$(srcdir)/../../newlib/libc/sys/sysmec +SIM_EXTRA_CFLAGS = -I$(srcdir)/../../newlib/libc/sys/sysmec -DNEED_UI_LOOP_HOOK SIM_EXTRA_CLEAN = clean-extra # Select mn10200 support in nltvals.def. 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); -- cgit v1.1