aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-01-27 12:51:36 -0700
committerTom Tromey <tom@tromey.com>2019-02-07 03:27:23 -0700
commit1a5c25988eabb35e0e40ea484b1eea029d9b7f53 (patch)
tree84c6f820847657cbb3a320ad7e1603cc42b2c3d9 /gdb/gdbserver
parent31528deca52123a5a6dee19d47bee94dff041325 (diff)
downloadgdb-1a5c25988eabb35e0e40ea484b1eea029d9b7f53.zip
gdb-1a5c25988eabb35e0e40ea484b1eea029d9b7f53.tar.gz
gdb-1a5c25988eabb35e0e40ea484b1eea029d9b7f53.tar.bz2
Normalize include guards in gdb
While working on my other scripts to deal with gdb headers, I noticed that some files were missing include guards. I wrote a script to add the missing ones, but found that using the obvious names for the guards ran into clashes -- for example, gdb/nat/linux-nat.h used "LINUX_NAT_H", but this was also the script's choice for gdb/linux-nat.h. So, I changed the script to normalize all include guards in gdb. This patch is the result. As usual the script is available here: https://github.com/tromey/gdb-refactoring-scripts Tested by rebuilding; I also ran it through "Fedora-x86_64-m64" on the buildbot. gdb/ChangeLog 2019-02-07 Tom Tromey <tom@tromey.com> * yy-remap.h: Add include guard. * xtensa-tdep.h: Add include guard. * xcoffread.h: Rename include guard. * varobj-iter.h: Add include guard. * tui/tui.h: Rename include guard. * tui/tui-winsource.h: Rename include guard. * tui/tui-wingeneral.h: Rename include guard. * tui/tui-windata.h: Rename include guard. * tui/tui-win.h: Rename include guard. * tui/tui-stack.h: Rename include guard. * tui/tui-source.h: Rename include guard. * tui/tui-regs.h: Rename include guard. * tui/tui-out.h: Rename include guard. * tui/tui-layout.h: Rename include guard. * tui/tui-io.h: Rename include guard. * tui/tui-hooks.h: Rename include guard. * tui/tui-file.h: Rename include guard. * tui/tui-disasm.h: Rename include guard. * tui/tui-data.h: Rename include guard. * tui/tui-command.h: Rename include guard. * tic6x-tdep.h: Add include guard. * target/waitstatus.h: Rename include guard. * target/wait.h: Rename include guard. * target/target.h: Rename include guard. * target/resume.h: Rename include guard. * target-float.h: Rename include guard. * stabsread.h: Add include guard. * rs6000-tdep.h: Add include guard. * riscv-fbsd-tdep.h: Add include guard. * regformats/regdef.h: Rename include guard. * record.h: Rename include guard. * python/python.h: Rename include guard. * python/python-internal.h: Rename include guard. * python/py-stopevent.h: Rename include guard. * python/py-ref.h: Rename include guard. * python/py-record.h: Rename include guard. * python/py-record-full.h: Rename include guard. * python/py-record-btrace.h: Rename include guard. * python/py-instruction.h: Rename include guard. * python/py-events.h: Rename include guard. * python/py-event.h: Rename include guard. * procfs.h: Add include guard. * proc-utils.h: Add include guard. * p-lang.h: Add include guard. * or1k-tdep.h: Rename include guard. * observable.h: Rename include guard. * nto-tdep.h: Rename include guard. * nat/x86-linux.h: Rename include guard. * nat/x86-linux-dregs.h: Rename include guard. * nat/x86-gcc-cpuid.h: Add include guard. * nat/x86-dregs.h: Rename include guard. * nat/x86-cpuid.h: Rename include guard. * nat/ppc-linux.h: Rename include guard. * nat/mips-linux-watch.h: Rename include guard. * nat/linux-waitpid.h: Rename include guard. * nat/linux-ptrace.h: Rename include guard. * nat/linux-procfs.h: Rename include guard. * nat/linux-osdata.h: Rename include guard. * nat/linux-nat.h: Rename include guard. * nat/linux-namespaces.h: Rename include guard. * nat/linux-btrace.h: Rename include guard. * nat/glibc_thread_db.h: Rename include guard. * nat/gdb_thread_db.h: Rename include guard. * nat/gdb_ptrace.h: Rename include guard. * nat/fork-inferior.h: Rename include guard. * nat/amd64-linux-siginfo.h: Rename include guard. * nat/aarch64-sve-linux-sigcontext.h: Rename include guard. * nat/aarch64-sve-linux-ptrace.h: Rename include guard. * nat/aarch64-linux.h: Rename include guard. * nat/aarch64-linux-hw-point.h: Rename include guard. * mn10300-tdep.h: Add include guard. * mips-linux-tdep.h: Add include guard. * mi/mi-parse.h: Rename include guard. * mi/mi-out.h: Rename include guard. * mi/mi-main.h: Rename include guard. * mi/mi-interp.h: Rename include guard. * mi/mi-getopt.h: Rename include guard. * mi/mi-console.h: Rename include guard. * mi/mi-common.h: Rename include guard. * mi/mi-cmds.h: Rename include guard. * mi/mi-cmd-break.h: Rename include guard. * m2-lang.h: Add include guard. * location.h: Rename include guard. * linux-record.h: Rename include guard. * linux-nat.h: Add include guard. * linux-fork.h: Add include guard. * i386-darwin-tdep.h: Rename include guard. * hppa-linux-offsets.h: Add include guard. * guile/guile.h: Rename include guard. * guile/guile-internal.h: Rename include guard. * gnu-nat.h: Rename include guard. * gdb-stabs.h: Rename include guard. * frv-tdep.h: Add include guard. * f-lang.h: Add include guard. * event-loop.h: Add include guard. * darwin-nat.h: Rename include guard. * cp-abi.h: Rename include guard. * config/sparc/nm-sol2.h: Rename include guard. * config/nm-nto.h: Rename include guard. * config/nm-linux.h: Add include guard. * config/i386/nm-i386gnu.h: Rename include guard. * config/djgpp/nl_types.h: Rename include guard. * config/djgpp/langinfo.h: Rename include guard. * compile/gcc-cp-plugin.h: Add include guard. * compile/gcc-c-plugin.h: Add include guard. * compile/compile.h: Rename include guard. * compile/compile-object-run.h: Rename include guard. * compile/compile-object-load.h: Rename include guard. * compile/compile-internal.h: Rename include guard. * compile/compile-cplus.h: Rename include guard. * compile/compile-c.h: Rename include guard. * common/xml-utils.h: Rename include guard. * common/x86-xstate.h: Rename include guard. * common/version.h: Rename include guard. * common/vec.h: Rename include guard. * common/tdesc.h: Rename include guard. * common/selftest.h: Rename include guard. * common/scoped_restore.h: Rename include guard. * common/scoped_mmap.h: Rename include guard. * common/scoped_fd.h: Rename include guard. * common/safe-iterator.h: Rename include guard. * common/run-time-clock.h: Rename include guard. * common/refcounted-object.h: Rename include guard. * common/queue.h: Rename include guard. * common/ptid.h: Rename include guard. * common/print-utils.h: Rename include guard. * common/preprocessor.h: Rename include guard. * common/pathstuff.h: Rename include guard. * common/observable.h: Rename include guard. * common/netstuff.h: Rename include guard. * common/job-control.h: Rename include guard. * common/host-defs.h: Rename include guard. * common/gdb_wait.h: Rename include guard. * common/gdb_vecs.h: Rename include guard. * common/gdb_unlinker.h: Rename include guard. * common/gdb_unique_ptr.h: Rename include guard. * common/gdb_tilde_expand.h: Rename include guard. * common/gdb_sys_time.h: Rename include guard. * common/gdb_string_view.h: Rename include guard. * common/gdb_splay_tree.h: Rename include guard. * common/gdb_setjmp.h: Rename include guard. * common/gdb_ref_ptr.h: Rename include guard. * common/gdb_optional.h: Rename include guard. * common/gdb_locale.h: Rename include guard. * common/gdb_assert.h: Rename include guard. * common/filtered-iterator.h: Rename include guard. * common/filestuff.h: Rename include guard. * common/fileio.h: Rename include guard. * common/environ.h: Rename include guard. * common/common-utils.h: Rename include guard. * common/common-types.h: Rename include guard. * common/common-regcache.h: Rename include guard. * common/common-inferior.h: Rename include guard. * common/common-gdbthread.h: Rename include guard. * common/common-exceptions.h: Rename include guard. * common/common-defs.h: Rename include guard. * common/common-debug.h: Rename include guard. * common/cleanups.h: Rename include guard. * common/buffer.h: Rename include guard. * common/btrace-common.h: Rename include guard. * common/break-common.h: Rename include guard. * cli/cli-utils.h: Rename include guard. * cli/cli-style.h: Rename include guard. * cli/cli-setshow.h: Rename include guard. * cli/cli-script.h: Rename include guard. * cli/cli-interp.h: Rename include guard. * cli/cli-decode.h: Rename include guard. * cli/cli-cmds.h: Rename include guard. * charset-list.h: Add include guard. * buildsym-legacy.h: Rename include guard. * bfin-tdep.h: Add include guard. * ax.h: Rename include guard. * arm-linux-tdep.h: Add include guard. * arm-fbsd-tdep.h: Add include guard. * arch/xtensa.h: Rename include guard. * arch/tic6x.h: Add include guard. * arch/i386.h: Add include guard. * arch/arm.h: Rename include guard. * arch/arm-linux.h: Rename include guard. * arch/arm-get-next-pcs.h: Rename include guard. * arch/amd64.h: Add include guard. * arch/aarch64-insn.h: Rename include guard. * arch-utils.h: Rename include guard. * annotate.h: Add include guard. * amd64-darwin-tdep.h: Rename include guard. * aarch64-linux-tdep.h: Add include guard. * aarch64-fbsd-tdep.h: Add include guard. * aarch32-linux-nat.h: Add include guard. gdb/gdbserver/ChangeLog 2019-02-07 Tom Tromey <tom@tromey.com> * x86-tdesc.h: Rename include guard. * x86-low.h: Add include guard. * wincecompat.h: Rename include guard. * win32-low.h: Add include guard. * utils.h: Rename include guard. * tracepoint.h: Rename include guard. * tdesc.h: Rename include guard. * target.h: Rename include guard. * server.h: Rename include guard. * remote-utils.h: Rename include guard. * regcache.h: Rename include guard. * nto-low.h: Rename include guard. * notif.h: Add include guard. * mem-break.h: Rename include guard. * lynx-low.h: Add include guard. * linux-x86-tdesc.h: Add include guard. * linux-s390-tdesc.h: Add include guard. * linux-ppc-tdesc-init.h: Add include guard. * linux-low.h: Add include guard. * linux-aarch64-tdesc.h: Add include guard. * linux-aarch32-low.h: Add include guard. * inferiors.h: Rename include guard. * i387-fp.h: Rename include guard. * hostio.h: Rename include guard. * gdbthread.h: Rename include guard. * gdb_proc_service.h: Rename include guard. * event-loop.h: Rename include guard. * dll.h: Rename include guard. * debug.h: Rename include guard. * ax.h: Rename include guard.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog33
-rw-r--r--gdb/gdbserver/ax.h6
-rw-r--r--gdb/gdbserver/debug.h6
-rw-r--r--gdb/gdbserver/dll.h6
-rw-r--r--gdb/gdbserver/event-loop.h6
-rw-r--r--gdb/gdbserver/gdb_proc_service.h6
-rw-r--r--gdb/gdbserver/gdbthread.h6
-rw-r--r--gdb/gdbserver/hostio.h6
-rw-r--r--gdb/gdbserver/i387-fp.h6
-rw-r--r--gdb/gdbserver/inferiors.h6
-rw-r--r--gdb/gdbserver/linux-aarch32-low.h5
-rw-r--r--gdb/gdbserver/linux-aarch64-tdesc.h5
-rw-r--r--gdb/gdbserver/linux-low.h5
-rw-r--r--gdb/gdbserver/linux-ppc-tdesc-init.h5
-rw-r--r--gdb/gdbserver/linux-s390-tdesc.h5
-rw-r--r--gdb/gdbserver/linux-x86-tdesc.h5
-rw-r--r--gdb/gdbserver/lynx-low.h5
-rw-r--r--gdb/gdbserver/mem-break.h6
-rw-r--r--gdb/gdbserver/notif.h5
-rw-r--r--gdb/gdbserver/nto-low.h7
-rw-r--r--gdb/gdbserver/regcache.h6
-rw-r--r--gdb/gdbserver/remote-utils.h6
-rw-r--r--gdb/gdbserver/server.h6
-rw-r--r--gdb/gdbserver/target.h6
-rw-r--r--gdb/gdbserver/tdesc.h6
-rw-r--r--gdb/gdbserver/tracepoint.h6
-rw-r--r--gdb/gdbserver/utils.h6
-rw-r--r--gdb/gdbserver/win32-low.h5
-rw-r--r--gdb/gdbserver/wincecompat.h6
-rw-r--r--gdb/gdbserver/x86-low.h4
-rw-r--r--gdb/gdbserver/x86-tdesc.h6
31 files changed, 142 insertions, 61 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index be9a263..17593cb 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,36 @@
+2019-02-07 Tom Tromey <tom@tromey.com>
+
+ * x86-tdesc.h: Rename include guard.
+ * x86-low.h: Add include guard.
+ * wincecompat.h: Rename include guard.
+ * win32-low.h: Add include guard.
+ * utils.h: Rename include guard.
+ * tracepoint.h: Rename include guard.
+ * tdesc.h: Rename include guard.
+ * target.h: Rename include guard.
+ * server.h: Rename include guard.
+ * remote-utils.h: Rename include guard.
+ * regcache.h: Rename include guard.
+ * nto-low.h: Rename include guard.
+ * notif.h: Add include guard.
+ * mem-break.h: Rename include guard.
+ * lynx-low.h: Add include guard.
+ * linux-x86-tdesc.h: Add include guard.
+ * linux-s390-tdesc.h: Add include guard.
+ * linux-ppc-tdesc-init.h: Add include guard.
+ * linux-low.h: Add include guard.
+ * linux-aarch64-tdesc.h: Add include guard.
+ * linux-aarch32-low.h: Add include guard.
+ * inferiors.h: Rename include guard.
+ * i387-fp.h: Rename include guard.
+ * hostio.h: Rename include guard.
+ * gdbthread.h: Rename include guard.
+ * gdb_proc_service.h: Rename include guard.
+ * event-loop.h: Rename include guard.
+ * dll.h: Rename include guard.
+ * debug.h: Rename include guard.
+ * ax.h: Rename include guard.
+
2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
PR gdb/23985
diff --git a/gdb/gdbserver/ax.h b/gdb/gdbserver/ax.h
index fd96834..3e9fd8f 100644
--- a/gdb/gdbserver/ax.h
+++ b/gdb/gdbserver/ax.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#if !defined (AX_H)
-#define AX_H 1
+#ifndef GDBSERVER_AX_H
+#define GDBSERVER_AX_H
#include "regcache.h"
@@ -142,4 +142,4 @@ struct emit_ops
extern CORE_ADDR current_insn_ptr;
extern int emit_error;
-#endif /* AX_H */
+#endif /* GDBSERVER_AX_H */
diff --git a/gdb/gdbserver/debug.h b/gdb/gdbserver/debug.h
index 041945a..e40f28c 100644
--- a/gdb/gdbserver/debug.h
+++ b/gdb/gdbserver/debug.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef DEBUG_H
-#define DEBUG_H
+#ifndef GDBSERVER_DEBUG_H
+#define GDBSERVER_DEBUG_H
/* We declare debug format variables here, and debug_threads but no other
debug content variables (e.g., not remote_debug) because while this file
@@ -51,4 +51,4 @@ void do_debug_exit (const char *function_name);
do { } while (0)
#endif
-#endif /* DEBUG_H */
+#endif /* GDBSERVER_DEBUG_H */
diff --git a/gdb/gdbserver/dll.h b/gdb/gdbserver/dll.h
index 4dad56b..fd45d73 100644
--- a/gdb/gdbserver/dll.h
+++ b/gdb/gdbserver/dll.h
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef DLL_H
-#define DLL_H
+#ifndef GDBSERVER_DLL_H
+#define GDBSERVER_DLL_H
#include <list>
@@ -37,4 +37,4 @@ extern void clear_dlls (void);
extern void loaded_dll (const char *name, CORE_ADDR base_addr);
extern void unloaded_dll (const char *name, CORE_ADDR base_addr);
-#endif /* DLL_H */
+#endif /* GDBSERVER_DLL_H */
diff --git a/gdb/gdbserver/event-loop.h b/gdb/gdbserver/event-loop.h
index 39135a4..a09a6ad 100644
--- a/gdb/gdbserver/event-loop.h
+++ b/gdb/gdbserver/event-loop.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef EVENT_LOOP_H
-#define EVENT_LOOP_H
+#ifndef GDBSERVER_EVENT_LOOP_H
+#define GDBSERVER_EVENT_LOOP_H
typedef void *gdb_client_data;
typedef int (handler_func) (int, gdb_client_data);
@@ -33,4 +33,4 @@ extern void delete_callback_event (int id);
extern void start_event_loop (void);
extern void initialize_event_loop (void);
-#endif /* EVENT_LOOP_H */
+#endif /* GDBSERVER_EVENT_LOOP_H */
diff --git a/gdb/gdbserver/gdb_proc_service.h b/gdb/gdbserver/gdb_proc_service.h
index 03e6a06..626bc16 100644
--- a/gdb/gdbserver/gdb_proc_service.h
+++ b/gdb/gdbserver/gdb_proc_service.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef GDB_PROC_SERVICE_H
-#define GDB_PROC_SERVICE_H
+#ifndef GDBSERVER_GDB_PROC_SERVICE_H
+#define GDBSERVER_GDB_PROC_SERVICE_H
#include "common/gdb_proc_service.h"
@@ -28,4 +28,4 @@ struct ps_prochandle
current inferior. */
};
-#endif /* gdb_proc_service.h */
+#endif /* GDBSERVER_GDB_PROC_SERVICE_H */
diff --git a/gdb/gdbserver/gdbthread.h b/gdb/gdbserver/gdbthread.h
index fcd0202..44ed3c4 100644
--- a/gdb/gdbserver/gdbthread.h
+++ b/gdb/gdbserver/gdbthread.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef GDB_THREAD_H
-#define GDB_THREAD_H
+#ifndef GDBSERVER_GDBTHREAD_H
+#define GDBSERVER_GDBTHREAD_H
#include "common/common-gdbthread.h"
#include "inferiors.h"
@@ -224,4 +224,4 @@ lwpid_of (const thread_info *thread)
return thread->id.lwp ();
}
-#endif /* GDB_THREAD_H */
+#endif /* GDBSERVER_GDBTHREAD_H */
diff --git a/gdb/gdbserver/hostio.h b/gdb/gdbserver/hostio.h
index acddef2..17a2bea 100644
--- a/gdb/gdbserver/hostio.h
+++ b/gdb/gdbserver/hostio.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef HOSTIO_H
-#define HOSTIO_H
+#ifndef GDBSERVER_HOSTIO_H
+#define GDBSERVER_HOSTIO_H
/* Per-connection setup. */
extern void hostio_handle_new_gdb_connection (void);
@@ -28,4 +28,4 @@ extern int handle_vFile (char *, int, int *);
/* Functions from hostio-errno.c. */
extern void hostio_last_error_from_errno (char *own_buf);
-#endif /* HOSTIO_H */
+#endif /* GDBSERVER_HOSTIO_H */
diff --git a/gdb/gdbserver/i387-fp.h b/gdb/gdbserver/i387-fp.h
index f331992..e5eaedf 100644
--- a/gdb/gdbserver/i387-fp.h
+++ b/gdb/gdbserver/i387-fp.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef I387_FP_H
-#define I387_FP_H
+#ifndef GDBSERVER_I387_FP_H
+#define GDBSERVER_I387_FP_H
void i387_cache_to_fsave (struct regcache *regcache, void *buf);
void i387_fsave_to_cache (struct regcache *regcache, const void *buf);
@@ -30,4 +30,4 @@ void i387_xsave_to_cache (struct regcache *regcache, const void *buf);
extern unsigned long long x86_xcr0;
-#endif /* I387_FP_H */
+#endif /* GDBSERVER_I387_FP_H */
diff --git a/gdb/gdbserver/inferiors.h b/gdb/gdbserver/inferiors.h
index b2a1866..cf284b8 100644
--- a/gdb/gdbserver/inferiors.h
+++ b/gdb/gdbserver/inferiors.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef INFERIORS_H
-#define INFERIORS_H
+#ifndef GDBSERVER_INFERIORS_H
+#define GDBSERVER_INFERIORS_H
#include "common/gdb_vecs.h"
#include <list>
@@ -144,4 +144,4 @@ void *thread_target_data (struct thread_info *);
struct regcache *thread_regcache_data (struct thread_info *);
void set_thread_regcache_data (struct thread_info *, struct regcache *);
-#endif /* INFERIORS_H */
+#endif /* GDBSERVER_INFERIORS_H */
diff --git a/gdb/gdbserver/linux-aarch32-low.h b/gdb/gdbserver/linux-aarch32-low.h
index 64f6848..44e626c 100644
--- a/gdb/gdbserver/linux-aarch32-low.h
+++ b/gdb/gdbserver/linux-aarch32-low.h
@@ -15,6 +15,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef GDBSERVER_LINUX_AARCH32_LOW_H
+#define GDBSERVER_LINUX_AARCH32_LOW_H
+
extern struct regs_info regs_info_aarch32;
void arm_fill_gregset (struct regcache *regcache, void *buf);
@@ -34,3 +37,5 @@ void init_registers_arm_with_neon (void);
int arm_is_thumb_mode (void);
extern const struct target_desc *tdesc_arm_with_neon;
+
+#endif /* GDBSERVER_LINUX_AARCH32_LOW_H */
diff --git a/gdb/gdbserver/linux-aarch64-tdesc.h b/gdb/gdbserver/linux-aarch64-tdesc.h
index a23b6b6..7ce8150 100644
--- a/gdb/gdbserver/linux-aarch64-tdesc.h
+++ b/gdb/gdbserver/linux-aarch64-tdesc.h
@@ -17,8 +17,13 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef GDBSERVER_LINUX_AARCH64_TDESC_H
+#define GDBSERVER_LINUX_AARCH64_TDESC_H
+
const target_desc * aarch64_linux_read_description (uint64_t vq);
#if GDB_SELF_TEST
void initialize_low_tdesc ();
#endif
+
+#endif /* GDBSERVER_LINUX_AARCH64_TDESC_H */
diff --git a/gdb/gdbserver/linux-low.h b/gdb/gdbserver/linux-low.h
index b99236f..d09390d 100644
--- a/gdb/gdbserver/linux-low.h
+++ b/gdb/gdbserver/linux-low.h
@@ -16,6 +16,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef GDBSERVER_LINUX_LOW_H
+#define GDBSERVER_LINUX_LOW_H
+
#include "nat/linux-nat.h"
#include "nat/gdb_thread_db.h"
#include <signal.h>
@@ -430,3 +433,5 @@ void thread_db_notice_clone (struct thread_info *parent_thr, ptid_t child_ptid);
bool thread_db_thread_handle (ptid_t ptid, gdb_byte **handle, int *handle_len);
extern int have_ptrace_getregset;
+
+#endif /* GDBSERVER_LINUX_LOW_H */
diff --git a/gdb/gdbserver/linux-ppc-tdesc-init.h b/gdb/gdbserver/linux-ppc-tdesc-init.h
index 16f5b9c..4f9a7c5 100644
--- a/gdb/gdbserver/linux-ppc-tdesc-init.h
+++ b/gdb/gdbserver/linux-ppc-tdesc-init.h
@@ -17,6 +17,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef GDBSERVER_LINUX_PPC_TDESC_INIT_H
+#define GDBSERVER_LINUX_PPC_TDESC_INIT_H
+
/* Note: since IPA obviously knows what ABI it's running on (32 vs 64),
it's sufficient to pass only the register set here. This, together with
the ABI known at IPA compile time, maps to a tdesc. */
@@ -105,3 +108,5 @@ void init_registers_powerpc_isa207_vsx64l (void);
void init_registers_powerpc_isa207_htm_vsx64l (void);
#endif
+
+#endif /* GDBSERVER_LINUX_PPC_TDESC_INIT_H */
diff --git a/gdb/gdbserver/linux-s390-tdesc.h b/gdb/gdbserver/linux-s390-tdesc.h
index cf1021a..dc05fcd 100644
--- a/gdb/gdbserver/linux-s390-tdesc.h
+++ b/gdb/gdbserver/linux-s390-tdesc.h
@@ -17,6 +17,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef GDBSERVER_LINUX_S390_TDESC_H
+#define GDBSERVER_LINUX_S390_TDESC_H
+
/* Note: since IPA obviously knows what ABI it's running on (s390 vs s390x),
it's sufficient to pass only the register set here. This, together with
the ABI known at IPA compile time, maps to a tdesc. */
@@ -109,3 +112,5 @@ void init_registers_s390_gs_linux64 (void);
extern const struct target_desc *tdesc_s390_gs_linux64;
#endif
+
+#endif /* GDBSERVER_LINUX_S390_TDESC_H */
diff --git a/gdb/gdbserver/linux-x86-tdesc.h b/gdb/gdbserver/linux-x86-tdesc.h
index ac4199e..5f1fb18 100644
--- a/gdb/gdbserver/linux-x86-tdesc.h
+++ b/gdb/gdbserver/linux-x86-tdesc.h
@@ -18,6 +18,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef GDBSERVER_LINUX_X86_TDESC_H
+#define GDBSERVER_LINUX_X86_TDESC_H
+
/* Note: since IPA obviously knows what ABI it's running on (i386 vs x86_64
vs x32), it's sufficient to pass only the register set here. This,
together with the ABI known at IPA compile time, maps to a tdesc. */
@@ -51,3 +54,5 @@ const struct target_desc *amd64_linux_read_description (uint64_t xcr0,
const struct target_desc *i386_linux_read_description (uint64_t xcr0);
void initialize_low_tdesc ();
+
+#endif /* GDBSERVER_LINUX_X86_TDESC_H */
diff --git a/gdb/gdbserver/lynx-low.h b/gdb/gdbserver/lynx-low.h
index 8a84204..506d6cb 100644
--- a/gdb/gdbserver/lynx-low.h
+++ b/gdb/gdbserver/lynx-low.h
@@ -15,6 +15,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef GDBSERVER_LYNX_LOW_H
+#define GDBSERVER_LYNX_LOW_H
+
struct regcache;
struct target_desc;
@@ -52,3 +55,5 @@ extern struct lynx_target_ops the_low_target;
/* The inferior's target description. This is a global because the
LynxOS ports support neither bi-arch nor multi-process. */
extern const struct target_desc *lynx_tdesc;
+
+#endif /* GDBSERVER_LYNX_LOW_H */
diff --git a/gdb/gdbserver/mem-break.h b/gdb/gdbserver/mem-break.h
index 49cdfea..d2d7510 100644
--- a/gdb/gdbserver/mem-break.h
+++ b/gdb/gdbserver/mem-break.h
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef MEM_BREAK_H
-#define MEM_BREAK_H
+#ifndef GDBSERVER_MEM_BREAK_H
+#define GDBSERVER_MEM_BREAK_H
#include "common/break-common.h"
@@ -276,4 +276,4 @@ int remove_memory_breakpoint (struct raw_breakpoint *bp);
void clone_all_breakpoints (struct thread_info *child_thread,
const struct thread_info *parent_thread);
-#endif /* MEM_BREAK_H */
+#endif /* GDBSERVER_MEM_BREAK_H */
diff --git a/gdb/gdbserver/notif.h b/gdb/gdbserver/notif.h
index add5536..7d07679 100644
--- a/gdb/gdbserver/notif.h
+++ b/gdb/gdbserver/notif.h
@@ -16,6 +16,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef GDBSERVER_NOTIF_H
+#define GDBSERVER_NOTIF_H
+
#include "target.h"
#include "common/queue.h"
@@ -62,3 +65,5 @@ void notif_event_enque (struct notif_server *notif,
struct notif_event *event);
void initialize_notif (void);
+
+#endif /* GDBSERVER_NOTIF_H */
diff --git a/gdb/gdbserver/nto-low.h b/gdb/gdbserver/nto-low.h
index 6114525..61981c6 100644
--- a/gdb/gdbserver/nto-low.h
+++ b/gdb/gdbserver/nto-low.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef NTO_LOW_H
-#define NTO_LOW_H
+#ifndef GDBSERVER_NTO_LOW_H
+#define GDBSERVER_NTO_LOW_H
struct target_desc;
@@ -46,5 +46,4 @@ extern struct nto_target_ops the_low_target;
LynxOS ports support neither bi-arch nor multi-process. */
extern const struct target_desc *nto_tdesc;
-#endif
-
+#endif /* GDBSERVER_NTO_LOW_H */
diff --git a/gdb/gdbserver/regcache.h b/gdb/gdbserver/regcache.h
index 98c3131..5ee4478 100644
--- a/gdb/gdbserver/regcache.h
+++ b/gdb/gdbserver/regcache.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef REGCACHE_H
-#define REGCACHE_H
+#ifndef GDBSERVER_REGCACHE_H
+#define GDBSERVER_REGCACHE_H
#include "common/common-regcache.h"
@@ -138,4 +138,4 @@ void collect_register_by_name (struct regcache *regcache,
ULONGEST regcache_raw_get_unsigned_by_name (struct regcache *regcache,
const char *name);
-#endif /* REGCACHE_H */
+#endif /* GDBSERVER_REGCACHE_H */
diff --git a/gdb/gdbserver/remote-utils.h b/gdb/gdbserver/remote-utils.h
index ca176b7..587afdb 100644
--- a/gdb/gdbserver/remote-utils.h
+++ b/gdb/gdbserver/remote-utils.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef REMOTE_UTILS_H
-#define REMOTE_UTILS_H
+#ifndef GDBSERVER_REMOTE_UTILS_H
+#define GDBSERVER_REMOTE_UTILS_H
extern int remote_debug;
@@ -69,4 +69,4 @@ int relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc);
void monitor_output (const char *msg);
-#endif /* REMOTE_UTILS_H */
+#endif /* GDBSERVER_REMOTE_UTILS_H */
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 26d0dfb..400001a 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef SERVER_H
-#define SERVER_H
+#ifndef GDBSERVER_SERVER_H
+#define GDBSERVER_SERVER_H
#include "common/common-defs.h"
@@ -205,4 +205,4 @@ client_state &get_client_state ();
#include "gdbthread.h"
#include "inferiors.h"
-#endif /* SERVER_H */
+#endif /* GDBSERVER_SERVER_H */
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index 225edd0..a4c9ad4 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -18,8 +18,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef TARGET_H
-#define TARGET_H
+#ifndef GDBSERVER_TARGET_H
+#define GDBSERVER_TARGET_H
#include <sys/types.h> /* for mode_t */
#include "target/target.h"
@@ -737,4 +737,4 @@ int target_can_do_hardware_single_step (void);
int default_breakpoint_kind_from_pc (CORE_ADDR *pcptr);
-#endif /* TARGET_H */
+#endif /* GDBSERVER_TARGET_H */
diff --git a/gdb/gdbserver/tdesc.h b/gdb/gdbserver/tdesc.h
index fe66408..8ccacbb 100644
--- a/gdb/gdbserver/tdesc.h
+++ b/gdb/gdbserver/tdesc.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef TDESC_H
-#define TDESC_H
+#ifndef GDBSERVER_TDESC_H
+#define GDBSERVER_TDESC_H
#include "common/tdesc.h"
@@ -93,4 +93,4 @@ void init_target_desc (struct target_desc *tdesc,
const struct target_desc *current_target_desc (void);
-#endif /* TDESC_H */
+#endif /* GDBSERVER_TDESC_H */
diff --git a/gdb/gdbserver/tracepoint.h b/gdb/gdbserver/tracepoint.h
index 7ed67dc..9560cdf 100644
--- a/gdb/gdbserver/tracepoint.h
+++ b/gdb/gdbserver/tracepoint.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef TRACEPOINT_H
-#define TRACEPOINT_H
+#ifndef GDBSERVER_TRACEPOINT_H
+#define GDBSERVER_TRACEPOINT_H
/* Size for a small buffer to report problems from the in-process
agent back to GDBserver. */
@@ -192,4 +192,4 @@ CORE_ADDR get_get_tsv_func_addr (void);
function in the IPA. */
CORE_ADDR get_set_tsv_func_addr (void);
-#endif /* TRACEPOINT_H */
+#endif /* GDBSERVER_TRACEPOINT_H */
diff --git a/gdb/gdbserver/utils.h b/gdb/gdbserver/utils.h
index 5437faa..2bc7a6e 100644
--- a/gdb/gdbserver/utils.h
+++ b/gdb/gdbserver/utils.h
@@ -16,10 +16,10 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef UTILS_H
-#define UTILS_H
+#ifndef GDBSERVER_UTILS_H
+#define GDBSERVER_UTILS_H
char *paddress (CORE_ADDR addr);
char *pfildes (gdb_fildes_t fd);
-#endif /* UTILS_H */
+#endif /* GDBSERVER_UTILS_H */
diff --git a/gdb/gdbserver/win32-low.h b/gdb/gdbserver/win32-low.h
index 9f8cf0c..815c1b0 100644
--- a/gdb/gdbserver/win32-low.h
+++ b/gdb/gdbserver/win32-low.h
@@ -16,6 +16,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef GDBSERVER_WIN32_LOW_H
+#define GDBSERVER_WIN32_LOW_H
+
#include <windows.h>
struct target_desc;
@@ -115,3 +118,5 @@ extern char * strwinerror (DWORD error);
/* in wincecompat.c */
extern void to_back_slashes (char *);
+
+#endif /* GDBSERVER_WIN32_LOW_H */
diff --git a/gdb/gdbserver/wincecompat.h b/gdb/gdbserver/wincecompat.h
index 797bed6..c4bc316 100644
--- a/gdb/gdbserver/wincecompat.h
+++ b/gdb/gdbserver/wincecompat.h
@@ -16,8 +16,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef WINCECOMPAT_H
-#define WINCECOMPAT_H
+#ifndef GDBSERVER_WINCECOMPAT_H
+#define GDBSERVER_WINCECOMPAT_H
#include <windows.h>
@@ -27,4 +27,4 @@
extern char * strwinerror (DWORD error);
#define strerror strwinerror
-#endif
+#endif /* GDBSERVER_WINCECOMPAT_H */
diff --git a/gdb/gdbserver/x86-low.h b/gdb/gdbserver/x86-low.h
index d7ec4b4..9f4a80a 100644
--- a/gdb/gdbserver/x86-low.h
+++ b/gdb/gdbserver/x86-low.h
@@ -17,8 +17,12 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef GDBSERVER_X86_LOW_H
+#define GDBSERVER_X86_LOW_H
#include "nat/x86-dregs.h"
/* Initialize STATE. */
extern void x86_low_init_dregs (struct x86_debug_reg_state *state);
+
+#endif /* GDBSERVER_X86_LOW_H */
diff --git a/gdb/gdbserver/x86-tdesc.h b/gdb/gdbserver/x86-tdesc.h
index cd0919d..0f01cc8 100644
--- a/gdb/gdbserver/x86-tdesc.h
+++ b/gdb/gdbserver/x86-tdesc.h
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifndef X86_TDESC_H
-#define X86_TDESC_H
+#ifndef GDBSERVER_X86_TDESC_H
+#define GDBSERVER_X86_TDESC_H
/* The "expedite" registers for x86 targets. Since whether the
variable is used depends on host/configuration, we mark it
@@ -29,4 +29,4 @@ static const char *i386_expedite_regs[] ATTRIBUTE_UNUSED
static const char *amd64_expedite_regs[] = {"rbp", "rsp", "rip", NULL};
#endif
-#endif /* X86_TDESC_H */
+#endif /* GDBSERVER_X86_TDESC_H */