Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: gdb/fbsd-nat.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/fbsd-nat.h ('k') | gdb/features/Makefile » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/fbsd-nat.c
diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c
index b3e4fabbb931ab9810646ee7f209bb91905c1218..6b37a1750d6a5f9fa670066613b6d53e1f4d1f8c 100644
--- a/gdb/fbsd-nat.c
+++ b/gdb/fbsd-nat.c
@@ -1,6 +1,6 @@
/* Native-dependent code for FreeBSD.
- Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc.
+ Copyright (C) 2002-2013 Free Software Foundation, Inc.
This file is part of GDB.
@@ -25,7 +25,7 @@
#include "gdbthread.h"
#include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
#include <sys/types.h>
#include <sys/procfs.h>
#include <sys/sysctl.h>
@@ -39,7 +39,7 @@
char *
fbsd_pid_to_exec_file (int pid)
{
- size_t len = MAXPATHLEN;
+ size_t len = PATH_MAX;
char *buf = xcalloc (len, sizeof (char));
char *path;
@@ -55,7 +55,7 @@ fbsd_pid_to_exec_file (int pid)
#endif
path = xstrprintf ("/proc/%d/file", pid);
- if (readlink (path, buf, MAXPATHLEN) == -1)
+ if (readlink (path, buf, PATH_MAX - 1) == -1)
{
xfree (buf);
buf = NULL;
@@ -125,14 +125,15 @@ fbsd_find_memory_regions (find_memory_region_ftype func, void *obfd)
{
fprintf_filtered (gdb_stdout,
"Save segment, %ld bytes at %s (%c%c%c)\n",
- size, paddress (target_gdbarch, start),
+ size, paddress (target_gdbarch (), start),
read ? 'r' : '-',
write ? 'w' : '-',
exec ? 'x' : '-');
}
- /* Invoke the callback function to create the corefile segment. */
- func (start, size, read, write, exec, obfd);
+ /* Invoke the callback function to create the corefile segment.
+ Pass MODIFIED as true, we do not know the real modification state. */
+ func (start, size, read, write, exec, 1, obfd);
}
do_cleanups (cleanup);
« no previous file with comments | « gdb/fbsd-nat.h ('k') | gdb/features/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698