mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
* monitor.c (monitor_load_srec monitor_make_srec): Move all
S-record download code into srec.c. * srec.c srec.h: New files. Contain S-record loading routines formerly in monitor.c. * serial.c serial.h: New routine just like fprintf, but uses serial_t instead of FILE *. * sh-tdep.c (frame_find_saved_regs init_extra_frame_info): Don't add four to saved pc (makes things match manual). Also, fix bug where we didn't get pc from stack frame correctly. * config/sh/tm-sh.h (SAVED_PC_AFTER_CALL): Don't add four to saved pc. Real hardware does this for you. * sh3-rom.c (sh3_load): New routine. Sets up for download then calls generic S-record loader. * config/h8300/h8300.mt, config/h8500/h8500.mt, config/m68k/monitor.mt, config/pa/hppapro.mt, config/sh/sh.mt: Add srec.o to TDEPFILES.
This commit is contained in:
29
gdb/serial.c
29
gdb/serial.c
@@ -307,6 +307,35 @@ connect_command (args, fromtty)
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
/* VARARGS */
|
||||
void
|
||||
#ifdef ANSI_PROTOTYPES
|
||||
serial_printf (serial_t desc, const char *format, ...)
|
||||
#else
|
||||
serial_printf (va_alist)
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list args;
|
||||
char *buf;
|
||||
#ifdef ANSI_PROTOTYPES
|
||||
va_start (args, format);
|
||||
#else
|
||||
serial_t desc;
|
||||
char *format;
|
||||
|
||||
va_start (args);
|
||||
desc = va_arg (args, serial_t);
|
||||
format = va_arg (args, char *);
|
||||
#endif
|
||||
|
||||
vasprintf (&buf, format, args);
|
||||
SERIAL_WRITE (desc, buf, strlen (buf));
|
||||
|
||||
free (buf);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
_initialize_serial ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user