/* The LoongArch opcode and mask definitions in this file are obtained from
https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=opcodes/loongarch-opc.c */
-#ifndef ARCH_LOONGARCH_INSN_H
-#define ARCH_LOONGARCH_INSN_H
+#ifndef GDB_ARCH_LOONGARCH_INSN_H
+#define GDB_ARCH_LOONGARCH_INSN_H
/* loongarch fix insn opcode */
#define OP_CLO_W 0x00001000
return false;
}
-#endif /* ARCH_LOONGARCH_INSN_H */
+#endif /* GDB_ARCH_LOONGARCH_INSN_H */
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/loongarch/include/asm/unistd.h */
-#ifndef ARCH_LOONGARCH_SYSCALL_H
-#define ARCH_LOONGARCH_SYSCALL_H
+#ifndef GDB_ARCH_LOONGARCH_SYSCALL_H
+#define GDB_ARCH_LOONGARCH_SYSCALL_H
enum loongarch_syscall
{
loongarch_sys_syscalls = 463,
};
-#endif /* ARCH_LOONGARCH_SYSCALL_H */
+#endif /* GDB_ARCH_LOONGARCH_SYSCALL_H */
failure(filename, i, "no header guard")
force_rewrite = True
symbol = m.group(1)
- updated = False
+ # Either None or a tuple like (LINE, TEXT) that describes a needed
+ # update.
+ updated = None
if symbol != expected:
force_rewrite = True
if force_rewrite:
contents[i] = "#ifndef " + expected + "\n"
- updated = True
+ updated = (i, "wrong symbol in ifndef")
i += 1
if i == len(contents):
failure(filename, i, "premature EOF")
failure(filename, i, "no define of header guard")
if contents[i] != "#define " + expected + "\n":
contents[i] = "#define " + expected + "\n"
- updated = True
+ if updated is None:
+ updated = (i, "wrong symbol in define")
i = len(contents) - 1
if not contents[i].startswith("#endif"):
failure(filename, i, "no trailing endif")
if contents[i] != "#endif /* " + expected + " */\n":
contents[i] = "#endif /* " + expected + " */\n"
- updated = True
- if updated and write_files:
- write_header(filename, contents)
+ if updated is None:
+ updated = (i, "wrong endif line")
+ if updated is not None:
+ if write_files:
+ write_header(filename, contents)
+ else:
+ failure(filename, *updated)
for filename in args:
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 CONFIG_DJGPP_LANGINFO_H
-#define CONFIG_DJGPP_LANGINFO_H
+#ifndef GDB_CONFIG_DJGPP_LANGINFO_H
+#define GDB_CONFIG_DJGPP_LANGINFO_H
#include <nl_types.h>
extern char *nl_langinfo (nl_item);
-#endif /* CONFIG_DJGPP_LANGINFO_H */
+#endif /* GDB_CONFIG_DJGPP_LANGINFO_H */
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 CONFIG_DJGPP_NL_TYPES_H
-#define CONFIG_DJGPP_NL_TYPES_H
+#ifndef GDB_CONFIG_DJGPP_NL_TYPES_H
+#define GDB_CONFIG_DJGPP_NL_TYPES_H
typedef int nl_item;
-#endif /* CONFIG_DJGPP_NL_TYPES_H */
+#endif /* GDB_CONFIG_DJGPP_NL_TYPES_H */
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 CONFIG_I386_NM_I386GNU_H
-#define CONFIG_I386_NM_I386GNU_H
+#ifndef GDB_CONFIG_I386_NM_X86_GNU_H
+#define GDB_CONFIG_I386_NM_X86_GNU_H
/* Thread flavors used in re-setting the T bit. */
#define THREAD_STATE_FLAVOR i386_REGS_SEGS_STATE
((((struct i386_thread_state *) (state))->efl &= ~0x100), 1)
#endif /* __x86_64__ */
-#endif /* CONFIG_I386_NM_I386GNU_H */
+#endif /* GDB_CONFIG_I386_NM_X86_GNU_H */
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 CONFIG_SPARC_NM_SOL2_H
-#define CONFIG_SPARC_NM_SOL2_H
+#ifndef GDB_CONFIG_SPARC_NM_SOL2_H
+#define GDB_CONFIG_SPARC_NM_SOL2_H
#define GDB_GREGSET_T prgregset_t
#define GDB_FPREGSET_T prfpregset_t
-#endif /* CONFIG_SPARC_NM_SOL2_H */
+#endif /* GDB_CONFIG_SPARC_NM_SOL2_H */
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 PYTHON_PY_COLOR_H
-#define PYTHON_PY_COLOR_H
+#ifndef GDB_PYTHON_PY_COLOR_H
+#define GDB_PYTHON_PY_COLOR_H
#include "python-internal.h"
#include "ui-style.h"
/* Extracts value from OBJ object of gdb.Color type. */
extern const ui_file_style::color &gdbpy_get_color (PyObject *obj);
-#endif /* PYTHON_PY_COLOR_H */
+#endif /* GDB_PYTHON_PY_COLOR_H */
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 SCOPED_SIGNAL_HANDLER_H
-#define SCOPED_SIGNAL_HANDLER_H
+#ifndef GDBSUPPORT_SCOPED_SIGNAL_HANDLER_H
+#define GDBSUPPORT_SCOPED_SIGNAL_HANDLER_H
#include <signal.h>
#endif
};
-#endif /* SCOPED_SIGNAL_HANDLER_H */
+#endif /* GDBSUPPORT_SCOPED_SIGNAL_HANDLER_H */