diff options
Diffstat (limited to 'gdb/infptrace.c')
-rw-r--r-- | gdb/infptrace.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gdb/infptrace.c b/gdb/infptrace.c index 601e157c8ef..a142080cf8c 100644 --- a/gdb/infptrace.c +++ b/gdb/infptrace.c @@ -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; } @@ -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 */ |