* Makefile.am (libbfd_la_LIBADD): Add @WIN32LIBADD@.
[deliverable/binutils-gdb.git] / gdb / remote-adapt.c
index 575bb6f66d47cabca54069f06b937bd91910bfea..8fcb1f70ac981348f76eee52fdd3a2bea26fbd8e 100644 (file)
@@ -17,7 +17,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* This is like remote.c but is for an esoteric situation--
    having a 29k board attached to an Adapt inline monitor. 
@@ -30,7 +30,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
    7/91 o - Freeze mode tracing can be done on a 29050.  */
 
 #include "defs.h"
-#include <string.h>
+#include "gdb_string.h"
 #include "inferior.h"
 #include "wait.h"
 #include "value.h"
@@ -407,7 +407,7 @@ adapt_create_inferior (execfile, args, env)
          expect_prompt ();
 #else
        insert_breakpoints ();  /* Needed to get correct instruction in cache */
-       proceed(entry_pt, -1, 0);
+       proceed(entry_pt, TARGET_SIGNAL_DEFAULT, 0);
 #endif
 
   } else {
@@ -484,7 +484,7 @@ erroid:
     error ("\
 Please include the name of the device for the serial port,\n\
 the baud rate, and the name of the program to run on the remote system.");
-  dev_name = (char*)malloc(p - name + 1);
+  dev_name = (char*)xmalloc(p - name + 1);
   strncpy (dev_name, name, p - name);
   dev_name[p - name] = '\0';
 
@@ -650,7 +650,8 @@ adapt_detach (args,from_tty)
 
 void
 adapt_resume (pid, step, sig)
-     int pid, step, sig;
+     int pid, step;
+     enum target_signal sig;
 {
   if (step)    
     {
@@ -680,7 +681,7 @@ adapt_resume (pid, step, sig)
 
 int
 adapt_wait (status)
-     WAITTYPE *status;
+     struct target_waitstatus *status;
 {
   /* Strings to look for.  '?' means match any single character.  
      Note that with the algorithm we use, the initial character
@@ -705,11 +706,13 @@ adapt_wait (status)
   int old_timeout = timeout;
   int old_immediate_quit = immediate_quit;
 
-  WSETEXIT ((*status), 0);
+  status->kind = TARGET_WAITKIND_EXITED;
+  status->value.integer = 0;
 
   if (need_artificial_trap != 0)
     {
-      WSETSTOP ((*status), SIGTRAP);
+      status->kind = TARGET_WAITKIND_STOPPED;
+      status->value.sig = TARGET_SIGNAL_TRAP;
       need_artificial_trap--;
       return 0;
     }
@@ -750,9 +753,15 @@ adapt_wait (status)
   }
   expect_prompt ();
   if (*bp== '\0')
-    WSETSTOP ((*status), SIGTRAP);
+    {
+      status->kind = TARGET_WAITKIND_STOPPED;
+      status->value.sig = TARGET_SIGNAL_TRAP;
+    }
   else
-    WSETEXIT ((*status), 0);
+    {
+      status->kind = TARGET_WAITKIND_EXITED;
+      status->value.integer = 0;
+    }
   timeout = old_timeout;
   immediate_quit = old_immediate_quit;
   return 0;
@@ -1334,6 +1343,7 @@ struct target_ops adapt_ops = {
        adapt_mourn,            /* mourn_inferior FIXME */
        0, /* can_run */
        0, /* notice_signals */
+       0,                      /* to_stop */
        process_stratum, 0, /* next */
        1, 1, 1, 1, 1,  /* all mem, mem, stack, regs, exec */
        0,0,            /* Section pointers */
This page took 0.024882 seconds and 4 git commands to generate.