* remote-vx.c (vx_attach): Interpret the command argument as an
authorStan Shebs <shebs@codesourcery.com>
Wed, 24 Aug 1994 20:22:25 +0000 (20:22 +0000)
committerStan Shebs <shebs@codesourcery.com>
Wed, 24 Aug 1994 20:22:25 +0000 (20:22 +0000)
unsigned long.

gdb/ChangeLog
gdb/remote-vx.c

index 544cbe8990554dad77940b2aea0e0d032b8446ce..a4d87d24056f8fe91cbd24eb8773ed0b5446a14f 100644 (file)
@@ -1,3 +1,8 @@
+Wed Aug 24 13:17:34 1994  Stan Shebs  (shebs@andros.cygnus.com)
+
+       * remote-vx.c (vx_attach): Interpret the command argument as an
+       unsigned long.
+
 Wed Aug 24 13:08:08 1994  Ian Lance Taylor  (ian@sanguine.cygnus.com)
 
        * configure.in: Change i[34]86 to i[345]86.
index 5c1aeaaf0fadc76143fa19f4184b56526cf422b1..15ca4aeb70d42abfeea9fc5be0a64195e504a0f7 100644 (file)
@@ -1094,7 +1094,7 @@ vx_attach (args, from_tty)
      char *args;
      int from_tty;
 {
-  int pid;
+  unsigned long pid;
   char *cptr = 0;
   Rptrace ptrace_in;
   Ptrace_return ptrace_out;
@@ -1103,13 +1103,13 @@ vx_attach (args, from_tty)
   if (!args)
     error_no_arg ("process-id to attach");
 
-  pid = strtol (args, &cptr, 0);
+  pid = strtoul (args, &cptr, 0);
   if ((cptr == args) || (*cptr != '\0'))
     error ("Invalid process-id -- give a single number in decimal or 0xhex");
 
   if (from_tty)
-      printf_unfiltered ("Attaching pid %s.\n",
-             local_hex_string((unsigned long) pid));
+    printf_unfiltered ("Attaching pid %s.\n",
+                      local_hex_string((unsigned long) pid));
 
   memset ((char *)&ptrace_in,  '\0', sizeof (ptrace_in));
   memset ((char *)&ptrace_out, '\0', sizeof (ptrace_out));
@@ -1126,6 +1126,9 @@ vx_attach (args, from_tty)
 
   /* It worked... */
   push_target (&vx_run_ops);
+  /* The unsigned long pid will get turned into a signed int here,
+     but it doesn't seem to matter.  inferior_pid must be signed
+     in order for other parts of GDB to work correctly.  */
   inferior_pid = pid;
   vx_running = 0;
 }
This page took 0.027751 seconds and 4 git commands to generate.