diff options
author | Steve Chamberlain <sac@cygnus> | 1995-06-21 21:47:06 +0000 |
---|---|---|
committer | Steve Chamberlain <sac@cygnus> | 1995-06-21 21:47:06 +0000 |
commit | 45993f6118fb8065ed70d448f4e741763cb8fe4d (patch) | |
tree | 5d0efb4afc2f3a4edde351181b04a8dd37a1fad4 /gdb/sparcl-tdep.c | |
parent | 65b175c5e61b058aa7de9660c720371b11b95c45 (diff) | |
download | gdb-45993f6118fb8065ed70d448f4e741763cb8fe4d.zip gdb-45993f6118fb8065ed70d448f4e741763cb8fe4d.tar.gz gdb-45993f6118fb8065ed70d448f4e741763cb8fe4d.tar.bz2 |
Hmm.. The ChangeLog went in, but not the code....
* monitor.c: Turn on caching.
(monitor_printf): If a ^C was sent, don't expect to see its
echo.
(monitor_open): Enable caching.
(monitor_resume, monitor_load): Flush cache.
(monitor_xfer_memory): Call cache routine.
(monitor_dump_regs): New.
(monitor_fetch_registers): If monitor_dump_regs available
then use it.
(monitor_load): Don't ref exec_bfd if it's NULL.
(monitor_load_srec): Use new monitor_make_srec calling convention.
(monitor_make_srec): Rewrite to cope with two, three and four byte
addresses.
* remote-hms.c (hms_cmds): Initialze end-of-command delim.
* dcache.h, dcache.h: Rewritten.
* remote.c: Reenable caching.
(getpkt): Reduce MAX_TRIES to 3.
(remote_xfer_memory): Use dcache_xfer_memory.
* defs.h (error_hook): New.
* top.c (error_hook): New definition.
* utils.c (error): Use error_hook if initialized.
* sparcl-tdep.c (HAVE_SOCKETS): Don't define if GO32 or WIN32. Use
HAVE_SOCKETS in place of #ifndef GO32.
Diffstat (limited to 'gdb/sparcl-tdep.c')
-rw-r--r-- | gdb/sparcl-tdep.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/gdb/sparcl-tdep.c b/gdb/sparcl-tdep.c index 89e293c..af8bc39 100644 --- a/gdb/sparcl-tdep.c +++ b/gdb/sparcl-tdep.c @@ -24,7 +24,15 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "serial.h" #include <sys/types.h> #include <sys/time.h> -#ifndef __GO32__ + +#if defined(__GO32__) || defined(WIN32) +#undef HAVE_SOCKETS +#else +#define HAVE_SOCKETS +#endif + + +#ifdef HAVE_SOCKETS #include <unistd.h> #include <sys/socket.h> #include <netinet/in.h> @@ -37,14 +45,14 @@ extern struct target_ops remote_ops; static char *remote_target_name = NULL; static serial_t remote_desc = NULL; static int serial_flag; -#ifndef __GO32__ +#ifdef HAVE_SOCKETS static int udp_fd = -1; #endif static serial_t open_tty PARAMS ((char *name)); static int send_resp PARAMS ((serial_t desc, char c)); static void close_tty PARAMS ((int ignore)); -#ifndef __GO32__ +#ifdef HAVE_SOCKETS static int recv_udp_buf PARAMS ((int fd, unsigned char *buf, int len, int timeout)); static int send_udp_buf PARAMS ((int fd, unsigned char *buf, int len)); #endif @@ -60,7 +68,7 @@ static void sparclite_serial_start PARAMS ((bfd_vma entry)); static void sparclite_serial_write PARAMS ((bfd *from_bfd, asection *from_sec, file_ptr from_addr, bfd_vma to_addr, int len)); -#ifndef __GO32__ +#ifdef HAVE_SOCKETS static unsigned short calc_checksum PARAMS ((unsigned char *buffer, int count)); static void sparclite_udp_start PARAMS ((bfd_vma entry)); @@ -324,7 +332,7 @@ close_tty (ignore) remote_desc = NULL; } -#ifndef __GO32__ +#ifdef HAVE_SOCKETS static int recv_udp_buf (fd, buf, len, timeout) int fd, len; @@ -449,7 +457,7 @@ or: target sparclite udp host"); } else { -#ifndef __GO32__ +#ifdef HAVE_SOCKETS struct hostent *he; struct sockaddr_in sockaddr; unsigned char buffer[100]; @@ -503,7 +511,7 @@ sparclite_close (quitting) { if (serial_flag) close_tty (0); -#ifndef __GO32__ +#ifdef HAVE_SOCKETS else if (udp_fd != -1) close (udp_fd); @@ -684,7 +692,7 @@ sparclite_serial_write (from_bfd, from_sec, from_addr, to_addr, len) error ("Bad checksum from load command (0x%x)", i); } -#ifndef __GO32__ +#ifdef HAVE_SOCKETS static unsigned short calc_checksum (buffer, count) @@ -806,7 +814,7 @@ sparclite_download (filename, from_tty) int from_tty; { if (!serial_flag) -#ifndef __GO32__ +#ifdef HAVE_SOCKETS download (remote_target_name, filename, from_tty, sparclite_udp_write, sparclite_udp_start); #else |