From c8154ce0d6942e5988076edd674036ff384ab433 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Mon, 4 Apr 2022 21:07:54 +0100 Subject: gdb: move gdb_disassembly_flag into a new disasm-flags.h file While working on the disassembler I was getting frustrated. Every time I touched disasm.h it seemed like every file in GDB would need to be rebuilt. Surely the disassembler can't be required by that many parts of GDB, right? Turns out that disasm.h is included in target.h, so pretty much every file was being rebuilt! The only thing from disasm.h that target.h needed is the gdb_disassembly_flag enum, as this is part of the target_ops api. In this commit I move gdb_disassembly_flag into its own file. This is then included in target.h and disasm.h, after which, the number of files that depend on disasm.h is much reduced. I also audited all the other includes of disasm.h and found that the includes in mep-tdep.c and python/py-registers.c are no longer needed, so I've removed these. Now, after changing disasm.h, GDB rebuilds much quicker. There should be no user visible changes after this commit. --- gdb/disasm.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'gdb/disasm.h') diff --git a/gdb/disasm.h b/gdb/disasm.h index b71cd09..7efab7d 100644 --- a/gdb/disasm.h +++ b/gdb/disasm.h @@ -20,19 +20,7 @@ #define DISASM_H #include "dis-asm.h" -#include "gdbsupport/enum-flags.h" - -enum gdb_disassembly_flag - { - DISASSEMBLY_SOURCE_DEPRECATED = (0x1 << 0), - DISASSEMBLY_RAW_INSN = (0x1 << 1), - DISASSEMBLY_OMIT_FNAME = (0x1 << 2), - DISASSEMBLY_FILENAME = (0x1 << 3), - DISASSEMBLY_OMIT_PC = (0x1 << 4), - DISASSEMBLY_SOURCE = (0x1 << 5), - DISASSEMBLY_SPECULATIVE = (0x1 << 6), - }; -DEF_ENUM_FLAGS_TYPE (enum gdb_disassembly_flag, gdb_disassembly_flags); +#include "disasm-flags.h" struct gdbarch; struct ui_out; -- cgit v1.1