diff options
author | Jason Molenda <jmolenda@apple.com> | 2000-02-07 00:19:45 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2000-02-07 00:19:45 +0000 |
commit | 3fc11d3e80ff4229745e2185a9ee77c780220f3d (patch) | |
tree | 9d2e895407002a577d938d47f3c5e2b57793ff60 /gdb/v850ice.c | |
parent | dfcd3bfb6f8a213007c20e60060b4e9ec9205205 (diff) | |
download | gdb-3fc11d3e80ff4229745e2185a9ee77c780220f3d.zip gdb-3fc11d3e80ff4229745e2185a9ee77c780220f3d.tar.gz gdb-3fc11d3e80ff4229745e2185a9ee77c780220f3d.tar.bz2 |
import insight-2000-02-04 snapshot (2nd try)
Diffstat (limited to 'gdb/v850ice.c')
-rw-r--r-- | gdb/v850ice.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gdb/v850ice.c b/gdb/v850ice.c index 4e187c0..dba9514 100644 --- a/gdb/v850ice.c +++ b/gdb/v850ice.c @@ -31,6 +31,7 @@ #include "value.h" #include "command.h" +#include <tcl.h> #include <windows.h> #include <winuser.h> /* for WM_USER */ @@ -119,6 +120,8 @@ static int ice_nexti PARAMS ((char *)); static void togdb_force_update PARAMS ((void)); +static void view_source PARAMS ((CORE_ADDR)); + static void do_gdb (char *, char *, void (*func) PARAMS ((char *, int)), int); @@ -131,6 +134,7 @@ long (__stdcall * RegisterClient) PARAMS ((HWND)); long (__stdcall * UnregisterClient) PARAMS ((void)); +extern Tcl_Interp *gdbtk_interp; /* Globals local to this file only */ static int ice_open = 0; /* Is ICE open? */ @@ -256,6 +260,7 @@ v850ice_wndproc (hwnd, message, wParam, lParam) 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) @@ -837,7 +842,12 @@ ice_cont (c) printf_filtered ("continue (ice)\n"); ReplyMessage ((LRESULT) 1); + if (gdbtk_interp == NULL) + { continue_command (NULL, 1); + } + else + Tcl_Eval (gdbtk_interp, "gdb_immediate continue"); return 1; } @@ -855,7 +865,12 @@ do_gdb (cmd, str, func, count) { printf_unfiltered (str); + if (gdbtk_interp == NULL) + { func (NULL, 0); + } + else + Tcl_Eval (gdbtk_interp, cmd); } } @@ -896,8 +911,22 @@ v850ice_command (arg, from_tty) static void togdb_force_update (void) { + if (gdbtk_interp != NULL) + Tcl_Eval (gdbtk_interp, "gdbtk_update"); } +static void +view_source (addr) + CORE_ADDR addr; +{ + char c[256]; + + if (gdbtk_interp != NULL) + { + sprintf (c, "catch {set src [lindex [ManagedWin::find SrcWin] 0]\n$src location BROWSE [gdb_loc *0x%x]}", addr); + Tcl_Eval (gdbtk_interp, c); + } +} /* Define the target subroutine names */ |