diff packages/cygmon/current/misc/utils.c @ 130:eb9fd8c04db3 ecos-sw-2000-10-23

Merge from eCos master repository on 2000-10-23-17:01:37-BST
author jlarmour
date Mon, 23 Oct 2000 17:10:57 +0000
parents 6ed91473a1cd
children e0c0827131d1
line wrap: on
line diff
--- a/packages/cygmon/current/misc/utils.c
+++ b/packages/cygmon/current/misc/utils.c
@@ -69,7 +69,14 @@ volatile int switch_to_stub_flag = 0;
 int
 input_char (void)
 {
-  int i = xgetchar ();
+  int i;
+
+  /* We have to drop the '+' characters on the floor
+     because gdb will send a '+' as the first character
+     when connecting to the target. If we waste time
+     echoing that, slow hw might get a uart overrun. */
+  while ((i = xgetchar ()) == '+');
+
   if (i == '$')
     {
       xungetchar ('$');
@@ -264,7 +271,7 @@ int2str (target_register_t number, int b
 
 #if HAVE_DOUBLE_REGS
 static char *
-doudble2str(double d)
+double2str(double d)
 {
   switch(sizeof(double))
     {