From: David Edelsohn Date: Thu, 14 Aug 1997 19:53:10 +0000 (+0000) Subject: * callback.c (os_poll_quit): Make static. X-Git-Tag: gdb-4_18~5035 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=052d7984df2f032ca3dfaaa1b581f8b8f30f63f7;p=external%2Fbinutils.git * callback.c (os_poll_quit): Make static. Call sim_cb_eprintf, not p->eprintf. (sim_cb_printf, sim_cb_eprintf): New functions. --- 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 + + * 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 * 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); +}