aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1997-08-14 19:53:10 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1997-08-14 19:53:10 +0000
commit052d7984df2f032ca3dfaaa1b581f8b8f30f63f7 (patch)
tree0dccbeb9cb418af6cfc9fccd2ca8b198da8a732e /sim
parent323b12f8ceac125ac03dbed077c1b98dc0a05eb1 (diff)
downloadgdb-052d7984df2f032ca3dfaaa1b581f8b8f30f63f7.zip
gdb-052d7984df2f032ca3dfaaa1b581f8b8f30f63f7.tar.gz
gdb-052d7984df2f032ca3dfaaa1b581f8b8f30f63f7.tar.bz2
* callback.c (os_poll_quit): Make static.
Call sim_cb_eprintf, not p->eprintf. (sim_cb_printf, sim_cb_eprintf): New functions.
Diffstat (limited to 'sim')
-rw-r--r--sim/common/ChangeLog10
-rw-r--r--sim/common/callback.c34
2 files changed, 41 insertions, 3 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 337c400..ba550cc 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,13 @@
+Thu Aug 14 12:48:57 1997 Doug Evans <dje@canuck.cygnus.com>
+
+ * callback.c (os_poll_quit): Make static.
+ Call sim_cb_eprintf, not p->eprintf.
+ (sim_cb_printf, sim_cb_eprintf): New functions.
+
+Thu Jul 24 08:48:05 1997 Stu Grossman (grossman@critters.cygnus.com)
+
+ * sim-types.h: Fix defs of 64 bit data types for MSVC.
+
Tue Jul 22 10:35:37 1997 Doug Evans <dje@canuck.cygnus.com>
* sim-n-core.h (sim_core_write_unaligned_N): Add missing break
diff --git a/sim/common/callback.c b/sim/common/callback.c
index e7bf405..9cf5a4a 100644
--- a/sim/common/callback.c
+++ b/sim/common/callback.c
@@ -1,5 +1,5 @@
/* Host callback routines for GDB.
- Copyright 1995, 1996 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file is part of GDB.
@@ -128,7 +128,7 @@ os_close (p, fd)
#if defined(__GO32__) || defined (_WIN32)
-int
+static int
os_poll_quit (p)
host_callback *p;
{
@@ -146,7 +146,7 @@ os_poll_quit (p)
}
else
{
- p->eprintf (p, "CTRL-A to quit, CTRL-B to quit harder\n");
+ sim_cb_eprintf (p, "CTRL-A to quit, CTRL-B to quit harder\n");
}
}
#else /* !_MSC_VER */
@@ -206,6 +206,7 @@ static int
os_open (p, name, flags)
host_callback *p;
const char *name;
+ int flags;
{
int i;
for (i = 0; i < MAX_CALLBACK_FDS; i++)
@@ -534,6 +535,11 @@ target_to_host_open (target_val)
if ((target_val & (TARGET_O_RDONLY | TARGET_O_WRONLY | TARGET_O_RDWR))
== m->target_val)
host_val |= m->host_val;
+ /* Handle the host/target differentiating between binary and
+ text mode. Only one case is of importance */
+#if ! defined (TARGET_O_BINARY) && defined (O_BINARY)
+ host_val |= O_BINARY;
+#endif
break;
default :
if ((m->target_val & target_val) == m->target_val)
@@ -544,3 +550,25 @@ target_to_host_open (target_val)
return host_val;
}
+
+/* Cover functions to the vfprintf callbacks. */
+
+void
+sim_cb_printf (host_callback *p, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start (ap, fmt);
+ p->vprintf_filtered (p, fmt, ap);
+ va_end (ap);
+}
+
+void
+sim_cb_eprintf (host_callback *p, const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start (ap, fmt);
+ p->evprintf_filtered (p, fmt, ap);
+ va_end (ap);
+}