* v850ice.c (WM_ADDR_TO_SYM): New message.
(v850ice_wndproc): Add handler for WM_SOURCE.
(v850ice_wait): Call the ui_loop_hook occasionally.
(ice_cont): Acknowledge message before doing anything.
(ice_stepi): Ack message and let gdbtk do stepping.
(ice_nexti): Ack message and let gdbtk do stepping.
(view_source): New function ICE calls to display source code.
+1998-09-24 Keith Seitz <keiths@cygnus.com>
+
+ * gdbtk.c (gdbtk_wait): Don't run the timer for ice targets.
+
+ * v850ice.c (WM_ADDR_TO_SYM): New message.
+ (v850ice_wndproc): Add handler for WM_SOURCE.
+ (v850ice_wait): Call the ui_loop_hook occasionally.
+ (ice_cont): Acknowledge message before doing anything.
+ (ice_stepi): Ack message and let gdbtk do stepping.
+ (ice_nexti): Ack message and let gdbtk do stepping.
+ (view_source): New function ICE calls to display source code.
+
start-sanitize-ide
Mon Sep 21 13:33:27 1998 Drew Moseley <dmoseley@cygnus.com>
start-sanitize-ide
Mon Sep 21 13:33:27 1998 Drew Moseley <dmoseley@cygnus.com>
int pid;
struct target_waitstatus *ourstatus;
{
int pid;
struct target_waitstatus *ourstatus;
{
+ /* Don't run the timer on various targets... */
+ if (!STREQ (target_shortname, "ice"))
+ gdbtk_start_timer ();
pid = target_wait (pid, ourstatus);
gdbtk_stop_timer ();
return pid;
pid = target_wait (pid, ourstatus);
gdbtk_stop_timer ();
return pid;
extern HINSTANCE Tk_GetHINSTANCE PARAMS ((void));
extern HINSTANCE Tk_GetHINSTANCE PARAMS ((void));
+extern void (*ui_loop_hook) PARAMS ((int));
+
/* Prototypes for local functions */
static int init_hidden_window PARAMS ((void));
/* Prototypes for local functions */
static int init_hidden_window PARAMS ((void));
static void togdb_force_update PARAMS ((void));
static void togdb_force_update PARAMS ((void));
+static void view_source PARAMS ((CORE_ADDR));
+
/* Globals */
static HWND hidden_hwnd; /* HWND for messages */
/* Globals */
static HWND hidden_hwnd; /* HWND for messages */
#define WM_SYM_TO_ADDR WM_USER+102
#define WM_ADDR_TO_SYM WM_USER+103
#define WM_DISASSEMBLY WM_USER+104
#define WM_SYM_TO_ADDR WM_USER+102
#define WM_ADDR_TO_SYM WM_USER+103
#define WM_DISASSEMBLY WM_USER+104
+#define WM_SOURCE WM_USER+105
/* STATE_CHANGE codes */
#define STATE_CHANGE_REGS 1 /* Register(s) changed */
/* STATE_CHANGE codes */
#define STATE_CHANGE_REGS 1 /* Register(s) changed */
case WM_ADDR_TO_SYM:
MessageBox (0, "Address resolution\nNot implemented", "GDB", MB_OK);
break;
case WM_ADDR_TO_SYM:
MessageBox (0, "Address resolution\nNot implemented", "GDB", MB_OK);
break;
+ case WM_SOURCE:
+ view_source ((CORE_ADDR) lParam);
+ break;
case WM_STATE_CHANGE:
switch (wParam)
{
case WM_STATE_CHANGE:
switch (wParam)
{
char buf[256];
struct MessageIO iob;
int done = 0;
char buf[256];
struct MessageIO iob;
int done = 0;
iob.size = 0;
iob.buf = buf;
do
{
iob.size = 0;
iob.buf = buf;
do
{
+ if (count++ % 100000)
+ {
+ ui_loop_hook (-2);
+ count = 0;
+ }
+
v850_status = ExeAppReq ("GDB", GCHECKSTATUS, NULL, &iob);
switch (v850_status)
v850_status = ExeAppReq ("GDB", GCHECKSTATUS, NULL, &iob);
switch (v850_status)
char *c;
{
printf_filtered ("continue (ice)");
char *c;
{
printf_filtered ("continue (ice)");
+ ReplyMessage ((LRESULT) 1);
Tcl_Eval (gdbtk_interp, "gdb_immediate continue");
return 1;
}
Tcl_Eval (gdbtk_interp, "gdb_immediate continue");
return 1;
}
sprintf (string, "gdb_immediate stepi %d", count);
printf_unfiltered ("stepi (ice)\n");
sprintf (string, "gdb_immediate stepi %d", count);
printf_unfiltered ("stepi (ice)\n");
- Tcl_Eval (gdbtk_interp, string);
ReplyMessage ((LRESULT) 1);
ReplyMessage ((LRESULT) 1);
+ Tcl_Eval (gdbtk_interp, string);
sprintf (string, "gdb_immediate nexti %d", count);
printf_unfiltered ("nexti (ice)\n");
sprintf (string, "gdb_immediate nexti %d", count);
printf_unfiltered ("nexti (ice)\n");
+ ReplyMessage ((LRESULT) 1);
Tcl_Eval (gdbtk_interp, string);
return 1;
}
Tcl_Eval (gdbtk_interp, string);
return 1;
}
Tcl_Eval (gdbtk_interp, "gdbtk_update");
}
Tcl_Eval (gdbtk_interp, "gdbtk_update");
}
+static void
+view_source (addr)
+ CORE_ADDR addr;
+{
+ char c[256];
+
+ sprintf (c, "set src [lindex [manage find src] 0]\n$src location [gdb_loc *0x%x]", addr);
+ Tcl_Eval (gdbtk_interp, c);
+}
+
/* Define the target subroutine names */
static void init_850ice_ops(void)
/* Define the target subroutine names */
static void init_850ice_ops(void)