2002-05-23 Michael Snyder <msnyder@redhat.com>
[binutils-gdb.git] / gdb / sparclet-rom.c
index 921c6a53f089f7b6c2d6fbabaaa06c0b2de1ef43..fa2ca1ef53a41e076c7ceb8467ccb37e1d2208ca 100644 (file)
@@ -1,5 +1,7 @@
 /* Remote target glue for the SPARC Sparclet ROM monitor.
-   Copyright 1995, 1996 Free Software Foundation, Inc.
+
+   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free
+   Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,6 +29,7 @@
 #include "srec.h"
 #include "symtab.h"
 #include "symfile.h"           /* for generic_load */
+#include "regcache.h"
 #include <time.h>
 
 extern void report_transfer_performance (unsigned long, time_t, time_t);
@@ -103,7 +106,7 @@ sparclet_supply_register (char *regname, int regnamelen, char *val, int vallen)
 }
 
 static void
-sparclet_load (serial_t desc, char *file, int hashmark)
+sparclet_load (struct serial *desc, char *file, int hashmark)
 {
   bfd *abfd;
   asection *s;
@@ -171,7 +174,7 @@ sparclet_load (serial_t desc, char *file, int hashmark)
 
            bfd_get_section_contents (abfd, s, buf, i, numbytes);
 
-           SERIAL_WRITE (desc, buf, numbytes);
+           serial_write (desc, buf, numbytes);
 
            if (hashmark)
              {
@@ -202,7 +205,7 @@ sparclet_load (serial_t desc, char *file, int hashmark)
   pop_target ();
   push_remote_target (monitor_get_dev_name (), 1);
 
-  return_to_top_level (RETURN_QUIT);
+  throw_exception (RETURN_QUIT);
 }
 
 /* Define the monitor command strings. Since these are passed directly