diff packages/cygmon/current/misc/bsp/common/debug-io.c @ 115:6ed91473a1cd ecos-sw-2000-08-21

Merge from eCos master repository on 2000-08-21-22:40:54-BST
author jlarmour
date Fri, 25 Aug 2000 17:32:38 +0000
parents 435cced73e2f
children e0c0827131d1
line wrap: on
line diff
--- a/packages/cygmon/current/misc/bsp/common/debug-io.c
+++ b/packages/cygmon/current/misc/bsp/common/debug-io.c
@@ -49,12 +49,18 @@
 
 static unsigned char __debug_ungetc;
 
+extern int stub_is_active;
+extern int __output_gdb_string (const char *str, int string_len);
 void
 bsp_debug_write(const char *p, int len)
 {
     struct bsp_comm_procs *com = bsp_shared_data->__debug_procs;
-
-    com->__write(com->ch_data, p, len);
+    if (stub_is_active) {
+        // We are running in 'GDB' mode
+        __output_gdb_string(p, len);
+    } else {
+        com->__write(com->ch_data, p, len);
+    }
 }