From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/3] Fix compile in the !HAVE_KINFO_GETVMMAP case.
Date: Tue, 08 Aug 2017 06:20:00 -0000 [thread overview]
Message-ID: <20170808061917.73979-2-jhb@FreeBSD.org> (raw)
In-Reply-To: <20170808061917.73979-1-jhb@FreeBSD.org>
gdb/ChangeLog:
* fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
"filestuff.h".
(fbsd_find_memory_regions): Fix `mapfile' initialization.
---
gdb/ChangeLog | 6 ++++++
gdb/fbsd-nat.c | 6 ++++--
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c4ad2bf1eb..133fbaf3bd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2017-08-07 John Baldwin <jhb@FreeBSD.org>
+
+ * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
+ "filestuff.h".
+ (fbsd_find_memory_regions): Fix `mapfile' initialization.
+
2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
PR breakpoints/21886
diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c
index 833f460237..3d3aa3df59 100644
--- a/gdb/fbsd-nat.c
+++ b/gdb/fbsd-nat.c
@@ -30,9 +30,11 @@
#include <sys/ptrace.h>
#include <sys/signal.h>
#include <sys/sysctl.h>
-#ifdef HAVE_KINFO_GETVMMAP
#include <sys/user.h>
+#ifdef HAVE_KINFO_GETVMMAP
#include <libutil.h>
+#else
+#include "filestuff.h"
#endif
#include "elf-bfd.h"
@@ -168,7 +170,7 @@ fbsd_find_memory_regions (struct target_ops *self,
mapfilename = xstrprintf ("/proc/%ld/map", (long) pid);
cleanup = make_cleanup (xfree, mapfilename);
- gdb_file_up mapfile = fopen (mapfilename, "r");
+ gdb_file_up mapfile (fopen (mapfilename, "r"));
if (mapfile == NULL)
error (_("Couldn't open %s."), mapfilename);
--
2.13.3
prev parent reply other threads:[~2017-08-08 6:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 6:20 [PATCH 0/3] Some C++-ification of the FreeBSD target John Baldwin
2017-08-08 6:20 ` [PATCH 2/3] Replace remaining cleanups in fbsd-nat.c John Baldwin
2017-08-08 9:16 ` Simon Marchi
2017-08-08 15:22 ` John Baldwin
2017-08-08 6:20 ` [PATCH 3/3] Replace home-grown linked-lists in FreeBSD's native target with std::list John Baldwin
2017-08-08 9:21 ` Simon Marchi
2017-08-08 15:22 ` John Baldwin
2017-08-08 6:20 ` John Baldwin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170808061917.73979-2-jhb@FreeBSD.org \
--to=jhb@freebsd.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox