]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* v850ice.c (do_gdb): New function.
authorKeith Seitz <keiths@cygnus>
Wed, 4 Nov 1998 01:17:03 +0000 (01:17 +0000)
committerKeith Seitz <keiths@cygnus>
Wed, 4 Nov 1998 01:17:03 +0000 (01:17 +0000)
        (ice_stepi): Use do_gdb to step properly.
        (ice_nexti): Use do_gdb to step properly.
        (view_source): Correct call to src window's location for new version.

gdb/ChangeLog-gdbtk
gdb/v850ice.c

index b7873328229ad67b47be72812490d4fd9afaa8a2..d34f3d2cb6b7005963368274c51b96da1ab9c408 100644 (file)
@@ -1,3 +1,10 @@
+1998-11-03  Keith Seitz  <keiths@cygnus.com>
+
+        * v850ice.c (do_gdb): New function.
+        (ice_stepi): Use do_gdb to step properly.
+        (ice_nexti): Use do_gdb to step properly.
+        (view_source): Correct call to src window's location for new version.
+
 Wed Oct 28 16:19:02 1998  Martin M. Hunt  <hunt@cygnus.com>
 
        * gdbtk-cmds.c (gdb_set_bp_addr): For callback, send full 
index bbf5b9e41c276d251b94f465376c706fc23f4351..1e869ea86da584f9f8865450f91f5078716604b1 100755 (executable)
@@ -124,6 +124,9 @@ static void togdb_force_update PARAMS ((void));
 
 static void view_source PARAMS ((CORE_ADDR));
 
+static void do_gdb (char *, char *, int);
+
+
 /* Globals */
 static HWND hidden_hwnd;                 /* HWND for messages */
 
@@ -843,17 +846,30 @@ ice_cont (c)
   return 1;
 }
 
+static void
+do_gdb (cmd, str, count)
+     char *cmd;
+     char *str;
+     int count;
+{
+
+  ReplyMessage ((LRESULT) 1);
+
+  while (count--)
+    {
+      printf_unfiltered (str);
+      Tcl_Eval (gdbtk_interp, cmd);
+    }
+}
+
+
 static int
 ice_stepi (c)
   char *c;
 {
-  char string[50] = "\0";
   int count = (int) c;
 
-  sprintf (string, "gdb_immediate stepi %d", count);
-  printf_unfiltered ("stepi (ice)\n");
-  ReplyMessage ((LRESULT) 1);
-  Tcl_Eval (gdbtk_interp, string);
+  do_gdb ("gdb_immediate stepi", "stepi (ice)\n", count);
   return 1;
 }
 
@@ -861,13 +877,9 @@ static int
 ice_nexti (c)
   char *c;
 {
-  char string[50] = "\0";
   int count = (int) c;
 
-  sprintf (string, "gdb_immediate nexti %d", count);
-  printf_unfiltered ("nexti (ice)\n");
-  ReplyMessage ((LRESULT) 1);
-  Tcl_Eval (gdbtk_interp, string);
+  do_gdb ("gdb_immediate nexti", "nexti (ice)\n", count);
   return 1;
 }
 
@@ -896,7 +908,7 @@ view_source (addr)
 {
   char c[256];
 
-  sprintf (c, "set src [lindex [manage find src] 0]\n$src location [gdb_loc *0x%x]", addr);
+  sprintf (c, "set src [lindex [manage find src] 0]\n$src location BROWSE [gdb_loc *0x%x]", addr);
   Tcl_Eval (gdbtk_interp, c);
 }