Fix compile in the !HAVE_KINFO_GETVMMAP case.
gdb/ChangeLog: * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and "filestuff.h". (fbsd_find_memory_regions): Fix `mapfile' initialization.
This commit is contained in:
parent
978c05401b
commit
142311d325
|
@ -1,3 +1,9 @@
|
||||||
|
2017-08-09 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-09 Tom Tromey <tom@tromey.com>
|
2017-08-09 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* skip.c (skiplist_entry): New constructor.
|
* skip.c (skiplist_entry): New constructor.
|
||||||
|
|
|
@ -30,9 +30,11 @@
|
||||||
#include <sys/ptrace.h>
|
#include <sys/ptrace.h>
|
||||||
#include <sys/signal.h>
|
#include <sys/signal.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#ifdef HAVE_KINFO_GETVMMAP
|
|
||||||
#include <sys/user.h>
|
#include <sys/user.h>
|
||||||
|
#ifdef HAVE_KINFO_GETVMMAP
|
||||||
#include <libutil.h>
|
#include <libutil.h>
|
||||||
|
#else
|
||||||
|
#include "filestuff.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "elf-bfd.h"
|
#include "elf-bfd.h"
|
||||||
|
@ -168,7 +170,7 @@ fbsd_find_memory_regions (struct target_ops *self,
|
||||||
|
|
||||||
mapfilename = xstrprintf ("/proc/%ld/map", (long) pid);
|
mapfilename = xstrprintf ("/proc/%ld/map", (long) pid);
|
||||||
cleanup = make_cleanup (xfree, mapfilename);
|
cleanup = make_cleanup (xfree, mapfilename);
|
||||||
gdb_file_up mapfile = fopen (mapfilename, "r");
|
gdb_file_up mapfile (fopen (mapfilename, "r"));
|
||||||
if (mapfile == NULL)
|
if (mapfile == NULL)
|
||||||
error (_("Couldn't open %s."), mapfilename);
|
error (_("Couldn't open %s."), mapfilename);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue