⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sim-raw-stdio.patch

📁 microwindows移植到S3C44B0的源码
💻 PATCH
字号:
diff -up sim/common/sim-options.c.\~1\~ sim/common/sim-options.c--- sim/common/sim-options.c.~1~	Thu Oct  5 19:59:52 2000+++ sim/common/sim-options.c	Tue Sep  4 13:50:12 2001@@ -1,5 +1,5 @@ /* Simulator option handling.-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.+   Copyright (C) 1996, 1997, 2001 Free Software Foundation, Inc.    Contributed by Cygnus Support.  This file is part of GDB, the GNU debugger.@@ -111,6 +111,7 @@ typedef enum { #ifdef SIM_H8300 /* FIXME: Should be movable to h8300 dir.  */   OPTION_H8300, #endif+  OPTION_STDIO, } STANDARD_OPTIONS;  static const OPTION standard_options[] =@@ -182,6 +183,10 @@ static const OPTION standard_options[] =       '\0', "BFDNAME", "Specify the object-code format for the object files",       standard_option_handler }, +  { {"stdio", required_argument, NULL, OPTION_STDIO},+    '\0', "on|off", "Turn special treatment of stdio on or off",+    standard_option_handler},+   { {NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL } }; @@ -399,6 +404,18 @@ standard_option_handler (SIM_DESC sd, si       if (STATE_OPEN_KIND (sd) == SIM_OPEN_STANDALONE) 	exit (0);       /* FIXME: 'twould be nice to do something similar if gdb.  */+      break;++    case OPTION_STDIO:+      if (strcmp (arg, "on") == 0)+	current_stdio = DO_USE_STDIO;+      else if (strcmp (arg, "off") == 0)+	current_stdio = DONT_USE_STDIO;+      else+	{+	  sim_io_eprintf (sd, "Argument `%s' for `--stdio' invalid, `on' or `off' expected\n", arg);+	  return SIM_RC_FAIL;+	}       break;     } diff -up sim/common/callback.c.\~1\~ sim/common/callback.c--- sim/common/callback.c.~1~	Thu Oct  5 19:59:52 2000+++ sim/common/callback.c	Tue Sep  4 14:46:50 2001@@ -289,18 +289,7 @@ os_write (p, fd, buf, len)   if (result)     return result;   real_fd = fdmap (p, fd);-  switch (real_fd)-    {-    default:-      result = wrap (p, write (real_fd, buf, len));-      break;-    case 1:-      result = p->write_stdout (p, buf, len);-      break;-    case 2:-      result = p->write_stderr (p, buf, len);-      break;-    }+  result = wrap (p, write (real_fd, buf, len));   return result; } 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -