From patchwork Tue Aug 8 06:19:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Baldwin X-Patchwork-Id: 21969 Received: (qmail 119044 invoked by alias); 8 Aug 2017 06:20:04 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 118934 invoked by uid 89); 8 Aug 2017 06:20:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy= X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Aug 2017 06:19:56 +0000 Received: from ralph.baldwin.cx.com (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 53D7C10AF01 for ; Tue, 8 Aug 2017 02:19:54 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PATCH 1/3] Fix compile in the !HAVE_KINFO_GETVMMAP case. Date: Mon, 7 Aug 2017 23:19:15 -0700 Message-Id: <20170808061917.73979-2-jhb@FreeBSD.org> In-Reply-To: <20170808061917.73979-1-jhb@FreeBSD.org> References: <20170808061917.73979-1-jhb@FreeBSD.org> X-IsSubscribed: yes gdb/ChangeLog: * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include 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 + + * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include and + "filestuff.h". + (fbsd_find_memory_regions): Fix `mapfile' initialization. + 2017-08-07 Maciej W. Rozycki 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 #include #include -#ifdef HAVE_KINFO_GETVMMAP #include +#ifdef HAVE_KINFO_GETVMMAP #include +#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);