* 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.
This commit is contained in:
parent
4817b40893
commit
4ce8d0e977
3 changed files with 44 additions and 2 deletions
|
@ -1,3 +1,15 @@
|
|||
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>
|
||||
|
||||
|
|
|
@ -593,7 +593,9 @@ gdbtk_wait (pid, ourstatus)
|
|||
int pid;
|
||||
struct target_waitstatus *ourstatus;
|
||||
{
|
||||
gdbtk_start_timer ();
|
||||
/* 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;
|
||||
|
|
|
@ -56,6 +56,8 @@ extern void continue_command PARAMS ((char *, int));
|
|||
|
||||
extern HINSTANCE Tk_GetHINSTANCE PARAMS ((void));
|
||||
|
||||
extern void (*ui_loop_hook) PARAMS ((int));
|
||||
|
||||
/* Prototypes for local functions */
|
||||
static int init_hidden_window PARAMS ((void));
|
||||
|
||||
|
@ -120,6 +122,8 @@ static int ice_nexti PARAMS ((char *));
|
|||
|
||||
static void togdb_force_update PARAMS ((void));
|
||||
|
||||
static void view_source PARAMS ((CORE_ADDR));
|
||||
|
||||
/* Globals */
|
||||
static HWND hidden_hwnd; /* HWND for messages */
|
||||
|
||||
|
@ -173,6 +177,7 @@ static int SimulateCallback; /* simulate a callback event */
|
|||
#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 */
|
||||
|
@ -253,6 +258,9 @@ v850ice_wndproc (hwnd, message, wParam, lParam)
|
|||
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)
|
||||
{
|
||||
|
@ -442,11 +450,19 @@ v850ice_wait (pid, status)
|
|||
char buf[256];
|
||||
struct MessageIO iob;
|
||||
int done = 0;
|
||||
int count = 0;
|
||||
|
||||
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)
|
||||
|
@ -822,6 +838,7 @@ ice_cont (c)
|
|||
char *c;
|
||||
{
|
||||
printf_filtered ("continue (ice)");
|
||||
ReplyMessage ((LRESULT) 1);
|
||||
Tcl_Eval (gdbtk_interp, "gdb_immediate continue");
|
||||
return 1;
|
||||
}
|
||||
|
@ -835,8 +852,8 @@ ice_stepi (c)
|
|||
|
||||
sprintf (string, "gdb_immediate stepi %d", count);
|
||||
printf_unfiltered ("stepi (ice)\n");
|
||||
Tcl_Eval (gdbtk_interp, string);
|
||||
ReplyMessage ((LRESULT) 1);
|
||||
Tcl_Eval (gdbtk_interp, string);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -849,6 +866,7 @@ ice_nexti (c)
|
|||
|
||||
sprintf (string, "gdb_immediate nexti %d", count);
|
||||
printf_unfiltered ("nexti (ice)\n");
|
||||
ReplyMessage ((LRESULT) 1);
|
||||
Tcl_Eval (gdbtk_interp, string);
|
||||
return 1;
|
||||
}
|
||||
|
@ -872,6 +890,16 @@ togdb_force_update (void)
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue