2003-05-08 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / infptrace.c
index 601e157c8efbf0a6656d2b1ff579470c918d4765..1225dd8a62c133441785edaee45207033a8e89c3 100644 (file)
@@ -301,7 +301,7 @@ detach (int signal)
   errno = 0;
   ptrace (PT_DETACH, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) 1,
           signal);
-  if (errno)
+  if (errno && errno != ESRCH)
     perror_with_name ("ptrace");
   attach_flag = 0;
 }
@@ -359,7 +359,7 @@ fetch_register (int regno)
   char mess[128];              /* For messages */
   register int i;
   unsigned int offset;         /* Offset of registers within the u area.  */
-  char *buf = alloca (MAX_REGISTER_RAW_SIZE);
+  char buf[MAX_REGISTER_SIZE];
   int tid;
 
   if (CANNOT_FETCH_REGISTER (regno))
@@ -424,7 +424,7 @@ store_register (int regno)
   register int i;
   unsigned int offset;         /* Offset of registers within the u area.  */
   int tid;
-  char *buf = alloca (MAX_REGISTER_RAW_SIZE);
+  char buf[MAX_REGISTER_SIZE];
 
   if (CANNOT_STORE_REGISTER (regno))
     {
@@ -629,7 +629,7 @@ static void
 udot_info (char *dummy1, int dummy2)
 {
 #if defined (KERNEL_U_SIZE)
-  int udot_off;                        /* Offset into user struct */
+  long udot_off;                       /* Offset into user struct */
   int udot_val;                        /* Value from user struct at udot_off */
   char mess[128];              /* For messages */
 #endif
@@ -657,12 +657,13 @@ udot_info (char *dummy1, int dummy2)
            {
              printf_filtered ("\n");
            }
-         printf_filtered ("%04x:", udot_off);
+         printf_filtered ("%s:", paddr (udot_off));
        }
       udot_val = ptrace (PT_READ_U, PIDGET (inferior_ptid), (PTRACE_ARG3_TYPE) udot_off, 0);
       if (errno != 0)
        {
-         sprintf (mess, "\nreading user struct at offset 0x%x", udot_off);
+         sprintf (mess, "\nreading user struct at offset 0x%s",
+                  paddr_nz (udot_off));
          perror_with_name (mess);
        }
       /* Avoid using nonportable (?) "*" in print specs */
This page took 0.02625 seconds and 4 git commands to generate.