#include "defs.h"
#include "gdbcore.h"
#include "target.h"
-#include "wait.h"
-#ifdef ANSI_PROTOTYPES
-#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
+#include "gdb_wait.h"
#include <signal.h>
#include "gdb_string.h"
#include <sys/types.h>
/* Send data to monitor. Works just like printf. */
static void
-#ifdef ANSI_PROTOTYPES
printf_monitor (char *pattern,...)
-#else
-printf_monitor (va_alist)
- va_dcl
-#endif
{
va_list args;
char buf[200];
int i;
-#ifdef ANSI_PROTOTYPES
va_start (args, pattern);
-#else
- char *pattern;
- va_start (args);
- pattern = va_arg (args, char *);
-#endif
vsprintf (buf, pattern, args);
va_end (args);
{
if (obj_sec->objfile != symfile_objfile)
new_symfile_objfile (obj_sec->objfile, 1, 0);
- offs = ((struct section_offsets *)
- alloca (sizeof (struct section_offsets)
- + (symfile_objfile->num_sections * sizeof (offs->offsets))));
- memcpy (offs, symfile_objfile->section_offsets,
- (sizeof (struct section_offsets) +
- (symfile_objfile->num_sections * sizeof (offs->offsets))));
+ offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
+ memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
ANOFFSET (offs, SECT_OFF_DATA) = addr;
ANOFFSET (offs, SECT_OFF_BSS) = addr;
do
{
FD_SET (0, &readfds);
- FD_SET (monitor_desc, &readfds);
+ FD_SET (DEPRECATED_SERIAL_FD (monitor_desc), &readfds);
numfds = select (sizeof (readfds) * 8, &readfds, 0, 0, 0);
}
while (numfds == 0);
}
}
- if (FD_ISSET (monitor_desc, &readfds))
+ if (FD_ISSET (DEPRECATED_SERIAL_FD (monitor_desc), &readfds))
{
while (1)
{