diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 847cff9296..932c035fb9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2012-01-23 Ulrich Weigand + + * inf-child.c: Include "gdb_stat.h" instead of . + * linux-tdep.c (linux_info_proc): Avoid ARI coding style warning. + * target.c (target_fileio_pwrite): Remove buffer address from + debug output. + (target_fileio_pread): Likewise. + 2012-01-20 Ulrich Weigand * NEWS: Document remote "info proc" and "generate-core-file". diff --git a/gdb/inf-child.c b/gdb/inf-child.c index 22718248b1..96c11579f8 100644 --- a/gdb/inf-child.c +++ b/gdb/inf-child.c @@ -26,6 +26,7 @@ #include "target.h" #include "inferior.h" #include "gdb_string.h" +#include "gdb_stat.h" #include "inf-child.h" #include "gdb/fileio.h" @@ -33,7 +34,6 @@ #include /* for MAXPATHLEN */ #endif #include -#include #include #include diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c index 421518a89a..3ab98c700f 100644 --- a/gdb/linux-tdep.c +++ b/gdb/linux-tdep.c @@ -402,7 +402,6 @@ linux_info_proc (struct gdbarch *gdbarch, char *args, { struct cleanup *cleanup = make_cleanup (xfree, data); const char *p = data; - const char *ep; ULONGEST val; printf_filtered (_("Process: %s\n"), @@ -410,10 +409,15 @@ linux_info_proc (struct gdbarch *gdbarch, char *args, while (*p && isspace (*p)) p++; - if (*p == '(' && (ep = strchr (p, ')')) != NULL) + if (*p == '(') { - printf_filtered ("Exec file: %.*s\n", (int) (ep - p - 1), p + 1); - p = ep + 1; + const char *ep = strchr (p, ')'); + if (ep != NULL) + { + printf_filtered ("Exec file: %.*s\n", + (int) (ep - p - 1), p + 1); + p = ep + 1; + } } while (*p && isspace (*p)) diff --git a/gdb/target.c b/gdb/target.c index c64a9d85c3..ad304bc7e1 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -3258,9 +3258,9 @@ target_fileio_pwrite (int fd, const gdb_byte *write_buf, int len, if (targetdebug) fprintf_unfiltered (gdb_stdlog, - "target_fileio_pwrite (%d,%p,%d,%s) " + "target_fileio_pwrite (%d,...,%d,%s) " "= %d (%d)\n", - fd, write_buf, len, pulongest (offset), + fd, len, pulongest (offset), ret, ret != -1 ? 0 : *target_errno); return ret; } @@ -3288,9 +3288,9 @@ target_fileio_pread (int fd, gdb_byte *read_buf, int len, if (targetdebug) fprintf_unfiltered (gdb_stdlog, - "target_fileio_pread (%d,%p,%d,%s) " + "target_fileio_pread (%d,...,%d,%s) " "= %d (%d)\n", - fd, read_buf, len, pulongest (offset), + fd, len, pulongest (offset), ret, ret != -1 ? 0 : *target_errno); return ret; }