aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat
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/nat
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/nat')
-rw-r--r--gdb/nat/aarch64-linux-hw-point.h6
-rw-r--r--gdb/nat/aarch64-linux.h6
-rw-r--r--gdb/nat/aarch64-sve-linux-ptrace.h6
-rw-r--r--gdb/nat/aarch64-sve-linux-sigcontext.h7
-rw-r--r--gdb/nat/amd64-linux-siginfo.h6
-rw-r--r--gdb/nat/fork-inferior.h6
-rw-r--r--gdb/nat/gdb_ptrace.h8
-rw-r--r--gdb/nat/gdb_thread_db.h6
-rw-r--r--gdb/nat/glibc_thread_db.h6
-rw-r--r--gdb/nat/linux-btrace.h6
-rw-r--r--gdb/nat/linux-namespaces.h6
-rw-r--r--gdb/nat/linux-nat.h6
-rw-r--r--gdb/nat/linux-osdata.h6
-rw-r--r--gdb/nat/linux-procfs.h6
-rw-r--r--gdb/nat/linux-ptrace.h6
-rw-r--r--gdb/nat/linux-waitpid.h6
-rw-r--r--gdb/nat/mips-linux-watch.h7
-rw-r--r--gdb/nat/ppc-linux.h6
-rw-r--r--gdb/nat/x86-cpuid.h6
-rw-r--r--gdb/nat/x86-dregs.h7
-rw-r--r--gdb/nat/x86-gcc-cpuid.h6
-rw-r--r--gdb/nat/x86-linux-dregs.h6
-rw-r--r--gdb/nat/x86-linux.h6
23 files changed, 75 insertions, 68 deletions
diff --git a/gdb/nat/aarch64-linux-hw-point.h b/gdb/nat/aarch64-linux-hw-point.h
index a84058e..5d9c2a1 100644
--- a/gdb/nat/aarch64-linux-hw-point.h
+++ b/gdb/nat/aarch64-linux-hw-point.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 AARCH64_LINUX_HW_POINT_H
-#define AARCH64_LINUX_HW_POINT_H 1
+#ifndef NAT_AARCH64_LINUX_HW_POINT_H
+#define NAT_AARCH64_LINUX_HW_POINT_H
#include "common/break-common.h" /* For enum target_hw_bp_type. */
@@ -197,4 +197,4 @@ struct aarch64_debug_reg_state *aarch64_get_debug_reg_state (pid_t pid);
int aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, int len);
-#endif /* AARCH64_LINUX_HW_POINT_H */
+#endif /* NAT_AARCH64_LINUX_HW_POINT_H */
diff --git a/gdb/nat/aarch64-linux.h b/gdb/nat/aarch64-linux.h
index 9f4ee8d..bc3c1f7 100644
--- a/gdb/nat/aarch64-linux.h
+++ b/gdb/nat/aarch64-linux.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 AARCH64_LINUX_H
-#define AARCH64_LINUX_H 1
+#ifndef NAT_AARCH64_LINUX_H
+#define NAT_AARCH64_LINUX_H
#include <signal.h>
@@ -129,4 +129,4 @@ ps_err_e aarch64_ps_get_thread_area (struct ps_prochandle *ph,
lwpid_t lwpid, int idx, void **base,
int is_64bit_p);
-#endif /* AARCH64_LINUX_H */
+#endif /* NAT_AARCH64_LINUX_H */
diff --git a/gdb/nat/aarch64-sve-linux-ptrace.h b/gdb/nat/aarch64-sve-linux-ptrace.h
index 2ccb4d4..167fc8e 100644
--- a/gdb/nat/aarch64-sve-linux-ptrace.h
+++ b/gdb/nat/aarch64-sve-linux-ptrace.h
@@ -17,8 +17,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 AARCH64_SVE_LINUX_PTRACE_H
-#define AARCH64_SVE_LINUX_PTRACE_H
+#ifndef NAT_AARCH64_SVE_LINUX_PTRACE_H
+#define NAT_AARCH64_SVE_LINUX_PTRACE_H
#include <signal.h>
#include <sys/utsname.h>
@@ -55,4 +55,4 @@ extern void
aarch64_sve_regs_copy_from_reg_buf (const struct reg_buffer_common *reg_buf,
void *buf);
-#endif /* aarch64-sve-linux-ptrace.h */
+#endif /* NAT_AARCH64_SVE_LINUX_PTRACE_H */
diff --git a/gdb/nat/aarch64-sve-linux-sigcontext.h b/gdb/nat/aarch64-sve-linux-sigcontext.h
index b2aa232..875c12c 100644
--- a/gdb/nat/aarch64-sve-linux-sigcontext.h
+++ b/gdb/nat/aarch64-sve-linux-sigcontext.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 AARCH64_SVE_LINUX_SIGCONTEXT_H
-#define AARCH64_SVE_LINUX_SIGCONTEXT_H
+#ifndef NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H
+#define NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H
#define SVE_MAGIC 0x53564501
@@ -264,5 +264,4 @@ struct user_sve_header {
SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, flags) \
: SVE_PT_FPSIMD_OFFSET + SVE_PT_FPSIMD_SIZE(vq, flags))
-
-#endif /* AARCH64_SVE_LINUX_SIGCONTEXT_H */
+#endif /* NAT_AARCH64_SVE_LINUX_SIGCONTEXT_H */
diff --git a/gdb/nat/amd64-linux-siginfo.h b/gdb/nat/amd64-linux-siginfo.h
index 9aa6ae9..50d7fdc 100644
--- a/gdb/nat/amd64-linux-siginfo.h
+++ b/gdb/nat/amd64-linux-siginfo.h
@@ -17,8 +17,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 AMD64_LINUX_SIGINFO_H
-#define AMD64_LINUX_SIGINFO_H 1
+#ifndef NAT_AMD64_LINUX_SIGINFO_H
+#define NAT_AMD64_LINUX_SIGINFO_H
#include <signal.h> /* For siginfo_t. */
@@ -55,4 +55,4 @@ int amd64_linux_siginfo_fixup_common (siginfo_t *native, gdb_byte *inf,
int direction,
enum amd64_siginfo_fixup_mode mode);
-#endif
+#endif /* NAT_AMD64_LINUX_SIGINFO_H */
diff --git a/gdb/nat/fork-inferior.h b/gdb/nat/fork-inferior.h
index 6d46dfc..1d0519f 100644
--- a/gdb/nat/fork-inferior.h
+++ b/gdb/nat/fork-inferior.h
@@ -17,8 +17,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 FORK_INFERIOR_H
-#define FORK_INFERIOR_H
+#ifndef NAT_FORK_INFERIOR_H
+#define NAT_FORK_INFERIOR_H
#include <string>
@@ -103,4 +103,4 @@ extern void trace_start_error (const char *fmt, ...)
extern void trace_start_error_with_name (const char *string)
ATTRIBUTE_NORETURN;
-#endif /* ! FORK_INFERIOR_H */
+#endif /* NAT_FORK_INFERIOR_H */
diff --git a/gdb/nat/gdb_ptrace.h b/gdb/nat/gdb_ptrace.h
index 289921a..d75c770 100644
--- a/gdb/nat/gdb_ptrace.h
+++ b/gdb/nat/gdb_ptrace.h
@@ -16,9 +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 GDB_PTRACE_H
-#define GDB_PTRACE_H
+
+#ifndef NAT_GDB_PTRACE_H
+#define NAT_GDB_PTRACE_H
/* The <sys/ptrace.h> header was introduced with 4.4BSD, and provided
the PT_* symbolic constants for the ptrace(2) request numbers. The
@@ -150,4 +150,4 @@ extern PTRACE_TYPE_RET ptrace();
ptrace ((PTRACE_TYPE_ARG1) request, pid, addr, data)
#endif
-#endif /* gdb_ptrace.h */
+#endif /* NAT_GDB_PTRACE_H */
diff --git a/gdb/nat/gdb_thread_db.h b/gdb/nat/gdb_thread_db.h
index 2c903bc..b55ba8d 100644
--- a/gdb/nat/gdb_thread_db.h
+++ b/gdb/nat/gdb_thread_db.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 GDB_THREAD_DB_H
-#define GDB_THREAD_DB_H 1
+#ifndef NAT_GDB_THREAD_DB_H
+#define NAT_GDB_THREAD_DB_H
#ifdef HAVE_THREAD_DB_H
#include <thread_db.h>
@@ -73,4 +73,4 @@ typedef td_err_e (td_thr_tlsbase_ftype) (const td_thrhandle_t *th,
typedef const char ** (td_symbol_list_ftype) (void);
typedef td_err_e (td_ta_delete_ftype) (td_thragent_t *);
-#endif /* GDB_THREAD_DB_H */
+#endif /* NAT_GDB_THREAD_DB_H */
diff --git a/gdb/nat/glibc_thread_db.h b/gdb/nat/glibc_thread_db.h
index 97423a4..598805d 100644
--- a/gdb/nat/glibc_thread_db.h
+++ b/gdb/nat/glibc_thread_db.h
@@ -16,8 +16,8 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifndef _THREAD_DB_H
-#define _THREAD_DB_H 1
+#ifndef NAT_GLIBC_THREAD_DB_H
+#define NAT_GLIBC_THREAD_DB_H
/* This is the debugger interface for the NPTL library. It is
modelled closely after the interface with same names in Solaris
@@ -455,4 +455,4 @@ extern td_err_e td_thr_dbsuspend (const td_thrhandle_t *__th);
/* Resume execution of thread TH. */
extern td_err_e td_thr_dbresume (const td_thrhandle_t *__th);
-#endif /* thread_db.h */
+#endif /* NAT_GLIBC_THREAD_DB_H */
diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h
index 2876a8e..df7b0d2 100644
--- a/gdb/nat/linux-btrace.h
+++ b/gdb/nat/linux-btrace.h
@@ -19,8 +19,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 LINUX_BTRACE_H
-#define LINUX_BTRACE_H
+#ifndef NAT_LINUX_BTRACE_H
+#define NAT_LINUX_BTRACE_H
#include "common/btrace-common.h"
#include "common/vec.h"
@@ -119,4 +119,4 @@ extern enum btrace_error linux_read_btrace (struct btrace_data *btrace,
extern const struct btrace_config *
linux_btrace_conf (const struct btrace_target_info *);
-#endif /* LINUX_BTRACE_H */
+#endif /* NAT_LINUX_BTRACE_H */
diff --git a/gdb/nat/linux-namespaces.h b/gdb/nat/linux-namespaces.h
index 72db9e5..166b11c 100644
--- a/gdb/nat/linux-namespaces.h
+++ b/gdb/nat/linux-namespaces.h
@@ -17,8 +17,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 LINUX_NAMESPACES_H
-#define LINUX_NAMESPACES_H
+#ifndef NAT_LINUX_NAMESPACES_H
+#define NAT_LINUX_NAMESPACES_H
/* Set to nonzero to enable debugging of Linux namespaces code. */
@@ -73,4 +73,4 @@ extern int linux_mntns_unlink (pid_t pid, const char *filename);
extern ssize_t linux_mntns_readlink (pid_t pid, const char *filename,
char *buf, size_t bufsiz);
-#endif /* LINUX_NAMESPACES_H */
+#endif /* NAT_LINUX_NAMESPACES_H */
diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
index 30f7590..1e32dd9 100644
--- a/gdb/nat/linux-nat.h
+++ b/gdb/nat/linux-nat.h
@@ -17,8 +17,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 LINUX_NAT_H
-#define LINUX_NAT_H
+#ifndef NAT_LINUX_NAT_H
+#define NAT_LINUX_NAT_H
#include "target/waitstatus.h"
@@ -90,4 +90,4 @@ extern void linux_stop_lwp (struct lwp_info *lwp);
extern int lwp_is_stepping (struct lwp_info *lwp);
-#endif /* LINUX_NAT_H */
+#endif /* NAT_LINUX_NAT_H */
diff --git a/gdb/nat/linux-osdata.h b/gdb/nat/linux-osdata.h
index 91e94d4..44cb63c 100644
--- a/gdb/nat/linux-osdata.h
+++ b/gdb/nat/linux-osdata.h
@@ -17,11 +17,11 @@
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 COMMON_LINUX_OSDATA_H
-#define COMMON_LINUX_OSDATA_H
+#ifndef NAT_LINUX_OSDATA_H
+#define NAT_LINUX_OSDATA_H
extern int linux_common_core_of_thread (ptid_t ptid);
extern LONGEST linux_common_xfer_osdata (const char *annex, gdb_byte *readbuf,
ULONGEST offset, ULONGEST len);
-#endif
+#endif /* NAT_LINUX_OSDATA_H */
diff --git a/gdb/nat/linux-procfs.h b/gdb/nat/linux-procfs.h
index ecae5aa..1bc6621 100644
--- a/gdb/nat/linux-procfs.h
+++ b/gdb/nat/linux-procfs.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 COMMON_LINUX_PROCFS_H
-#define COMMON_LINUX_PROCFS_H
+#ifndef NAT_LINUX_PROCFS_H
+#define NAT_LINUX_PROCFS_H
#include <unistd.h>
@@ -85,4 +85,4 @@ extern char *linux_proc_pid_to_exec_file (int pid);
extern void linux_proc_init_warnings ();
-#endif /* COMMON_LINUX_PROCFS_H */
+#endif /* NAT_LINUX_PROCFS_H */
diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
index f18f5a5..cfb1217 100644
--- a/gdb/nat/linux-ptrace.h
+++ b/gdb/nat/linux-ptrace.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 COMMON_LINUX_PTRACE_H
-#define COMMON_LINUX_PTRACE_H
+#ifndef NAT_LINUX_PTRACE_H
+#define NAT_LINUX_PTRACE_H
struct buffer;
@@ -196,4 +196,4 @@ extern int linux_ptrace_get_extended_event (int wstat);
extern int linux_is_extended_waitstatus (int wstat);
extern int linux_wstatus_maybe_breakpoint (int wstat);
-#endif /* COMMON_LINUX_PTRACE_H */
+#endif /* NAT_LINUX_PTRACE_H */
diff --git a/gdb/nat/linux-waitpid.h b/gdb/nat/linux-waitpid.h
index df998a9..cdec1bf 100644
--- a/gdb/nat/linux-waitpid.h
+++ b/gdb/nat/linux-waitpid.h
@@ -17,8 +17,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 LINUX_WAITPID_H
-#define LINUX_WAITPID_H
+#ifndef NAT_LINUX_WAITPID_H
+#define NAT_LINUX_WAITPID_H
/* Wrapper function for waitpid which handles EINTR. */
extern int my_waitpid (int pid, int *status, int flags);
@@ -27,4 +27,4 @@ extern int my_waitpid (int pid, int *status, int flags);
messages only. */
extern char *status_to_str (int status);
-#endif /* LINUX_WAITPID_H */
+#endif /* NAT_LINUX_WAITPID_H */
diff --git a/gdb/nat/mips-linux-watch.h b/gdb/nat/mips-linux-watch.h
index 222b5cf..35e8d9d 100644
--- a/gdb/nat/mips-linux-watch.h
+++ b/gdb/nat/mips-linux-watch.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 MIPS_LINUX_WATCH_H
-#define MIPS_LINUX_WATCH_H 1
+#ifndef NAT_MIPS_LINUX_WATCH_H
+#define NAT_MIPS_LINUX_WATCH_H
#include <asm/ptrace.h>
#include "common/break-common.h"
@@ -115,4 +115,5 @@ uint32_t mips_linux_watch_type_to_irw (enum target_hw_bp_type type);
int mips_linux_read_watch_registers (long lwpid,
struct pt_watch_regs *watch_readback,
int *watch_readback_valid, int force);
-#endif
+
+#endif /* NAT_MIPS_LINUX_WATCH_H */
diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
index 059b994..f1561b3 100644
--- a/gdb/nat/ppc-linux.h
+++ b/gdb/nat/ppc-linux.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 PPC_LINUX_H
-#define PPC_LINUX_H 1
+#ifndef NAT_PPC_LINUX_H
+#define NAT_PPC_LINUX_H
#include <asm/ptrace.h>
#include <asm/cputable.h>
@@ -165,4 +165,4 @@
/* Return the wordsize of the target, either 4 or 8 bytes. */
int ppc_linux_target_wordsize (int tid);
-#endif
+#endif /* NAT_PPC_LINUX_H */
diff --git a/gdb/nat/x86-cpuid.h b/gdb/nat/x86-cpuid.h
index fbfb184..2a14327 100644
--- a/gdb/nat/x86-cpuid.h
+++ b/gdb/nat/x86-cpuid.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 X86_CPUID_COMMON_H
-#define X86_CPUID_COMMON_H
+#ifndef NAT_X86_CPUID_H
+#define NAT_X86_CPUID_H
/* Always include the header for the cpu bit defines. */
#include "x86-gcc-cpuid.h"
@@ -60,4 +60,4 @@ x86_cpuid (unsigned int __level,
#endif /* i386 && x86_64 */
-#endif /* X86_CPUID_COMMON_H */
+#endif /* NAT_X86_CPUID_H */
diff --git a/gdb/nat/x86-dregs.h b/gdb/nat/x86-dregs.h
index 67384a2..e8a2e00 100644
--- a/gdb/nat/x86-dregs.h
+++ b/gdb/nat/x86-dregs.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 NAT_X86_DREGS_H
+#define NAT_X86_DREGS_H
+
/* Support for hardware watchpoints and breakpoints using the x86
debug registers.
@@ -29,8 +32,6 @@
counts, and allow to watch regions up to 16 bytes long
(32 bytes on 64 bit hosts). */
-#ifndef X86_DREGS_H
-#define X86_DREGS_H 1
#include "common/break-common.h" /* target_hw_bp_type */
@@ -132,4 +133,4 @@ extern int x86_dr_stopped_by_watchpoint (struct x86_debug_reg_state *state);
triggered. Otherwise return false. */
extern int x86_dr_stopped_by_hw_breakpoint (struct x86_debug_reg_state *state);
-#endif /* X86_DREGS_H */
+#endif /* NAT_X86_DREGS_H */
diff --git a/gdb/nat/x86-gcc-cpuid.h b/gdb/nat/x86-gcc-cpuid.h
index ec71c3f..21cfa19 100644
--- a/gdb/nat/x86-gcc-cpuid.h
+++ b/gdb/nat/x86-gcc-cpuid.h
@@ -2,6 +2,10 @@
* Helper cpuid.h file copied from gcc-6.0.0. Code in gdb should not
* include this directly, but pull in x86-cpuid.h and use that func.
*/
+
+#ifndef NAT_X86_GCC_CPUID_H
+#define NAT_X86_GCC_CPUID_H
+
/*
* Copyright (C) 2007-2019 Free Software Foundation, Inc.
*
@@ -268,3 +272,5 @@ __get_cpuid_count (unsigned int __leaf, unsigned int __subleaf,
__cpuid_count (__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
return 1;
}
+
+#endif /* NAT_X86_GCC_CPUID_H */
diff --git a/gdb/nat/x86-linux-dregs.h b/gdb/nat/x86-linux-dregs.h
index 056f936..e608697 100644
--- a/gdb/nat/x86-linux-dregs.h
+++ b/gdb/nat/x86-linux-dregs.h
@@ -17,8 +17,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_LINUX_DREGS_H
-#define X86_LINUX_DREGS_H
+#ifndef NAT_X86_LINUX_DREGS_H
+#define NAT_X86_LINUX_DREGS_H
/* Return the address stored in the current inferior's debug register
REGNUM. */
@@ -50,4 +50,4 @@ extern unsigned long x86_linux_dr_get_status (void);
extern void x86_linux_update_debug_registers (struct lwp_info *lwp);
-#endif /* X86_LINUX_DREGS_H */
+#endif /* NAT_X86_LINUX_DREGS_H */
diff --git a/gdb/nat/x86-linux.h b/gdb/nat/x86-linux.h
index 0b13bb7..7d4fbbc 100644
--- a/gdb/nat/x86-linux.h
+++ b/gdb/nat/x86-linux.h
@@ -17,8 +17,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_LINUX_H
-#define X86_LINUX_H
+#ifndef NAT_X86_LINUX_H
+#define NAT_X86_LINUX_H
#include "nat/linux-nat.h"
@@ -47,4 +47,4 @@ extern void x86_linux_delete_thread (struct arch_lwp_info *arch_lwp);
extern void x86_linux_prepare_to_resume (struct lwp_info *lwp);
-#endif /* X86_LINUX_H */
+#endif /* NAT_X86_LINUX_H */