aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2009-12-28 19:45:56 +0000
committerDoug Evans <dje@google.com>2009-12-28 19:45:56 +0000
commit957f3f49de19d92c755ccc59e36fffc1f65afd63 (patch)
treeb613b9fab85c6c80de0642650c3a32ec00943249 /gdb
parent4e67d4ca2a172339a5899ae47a065e61d1a13e69 (diff)
downloadgdb-957f3f49de19d92c755ccc59e36fffc1f65afd63.zip
gdb-957f3f49de19d92c755ccc59e36fffc1f65afd63.tar.gz
gdb-957f3f49de19d92c755ccc59e36fffc1f65afd63.tar.bz2
* linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
elf/external.h. Include <elf.h> instead but only if necessary.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/linux-low.c14
2 files changed, 14 insertions, 5 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 3706a4f..9f23916 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-28 Doug Evans <dje@google.com>
+
+ * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
+ elf/external.h. Include <elf.h> instead but only if necessary.
+
2009-12-28 Pedro Alves <pedro@codesourcery.com>
* linux-low.c (linux_remove_process): Remove `detaching'
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 4c636e1..06b2202 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -19,9 +19,6 @@
#include "server.h"
#include "linux-low.h"
-#include "ansidecl.h" /* For ATTRIBUTE_PACKED, must be bug in external.h. */
-#include "elf/common.h"
-#include "elf/external.h"
#include <sys/wait.h>
#include <stdio.h>
@@ -42,6 +39,13 @@
#include <dirent.h>
#include <sys/stat.h>
#include <sys/vfs.h>
+#ifndef ELFMAG0
+/* Don't include <linux/elf.h> here. If it got included by gdb_proc_service.h
+ then ELFMAG0 will have been defined. If it didn't get included by
+ gdb_proc_service.h then including it will likely introduce a duplicate
+ definition of elf_fpregset_t. */
+#include <elf.h>
+#endif
#ifndef SPUFS_MAGIC
#define SPUFS_MAGIC 0x23c9b64e
@@ -191,7 +195,7 @@ linux_child_pid_to_exec_file (int pid)
/* Return non-zero if HEADER is a 64-bit ELF file. */
static int
-elf_64_header_p (const Elf64_External_Ehdr *header)
+elf_64_header_p (const Elf64_Ehdr *header)
{
return (header->e_ident[EI_MAG0] == ELFMAG0
&& header->e_ident[EI_MAG1] == ELFMAG1
@@ -207,7 +211,7 @@ elf_64_header_p (const Elf64_External_Ehdr *header)
int
elf_64_file_p (const char *file)
{
- Elf64_External_Ehdr header;
+ Elf64_Ehdr header;
int fd;
fd = open (file, O_RDONLY);