Re: [PATCH v6 07/10] Move linux_find_memory_regions_full & co.

Gary Benson
2015-06-08T08:42:31Z

Jan Kratochvil wrote:
> diff --git a/gdb/common/linux-maps.c b/gdb/common/linux-maps.c
> index bb3eac9..462a00f 100644
> --- a/gdb/common/linux-maps.c
> +++ b/gdb/common/linux-maps.c
> @@ -18,8 +18,529 @@
>
> #ifdef GDBSERVER
> #include "server.h"
> +#include <fcntl.h>
> +#include <unistd.h>
> #else
> #include "defs.h"
> +#include "target.h"
> #endif
>
> #include "linux-maps.h"
> +#include "gdb_assert.h"
> +#include <ctype.h>
> +#include <string.h>
> +#include "target-utils.h"
> +#include "gdb_regex.h"

In addition to the comment I made previously about not using GDBSERVER
conditionals, please note that common-defs.h includes gdb_assert.h and
string.h, so these two headers should not be listed here.

> diff --git a/gdb/common/target-utils.c b/gdb/common/target-utils.c
> index 308996d..ab8991d 100644
> --- a/gdb/common/target-utils.c
> +++ b/gdb/common/target-utils.c
> @@ -23,4 +23,84 @@
> #include "defs.h"
> #endif
>
> +#include <string.h>
> #include "target-utils.h"
> +#include "gdb_assert.h"

Ditto.

Cheers,
Gary

--