mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 12:03:41 +08:00
c8154ce0d6
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.
41 lines
1.3 KiB
C
41 lines
1.3 KiB
C
/* Disassemble flags for GDB.
|
|
|
|
Copyright (C) 2002-2022 Free Software Foundation, Inc.
|
|
|
|
This file is part of GDB.
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
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 DISASM_FLAGS_H
|
|
#define DISASM_FLAGS_H
|
|
|
|
#include "gdbsupport/enum-flags.h"
|
|
|
|
/* Flags used to control how GDB's disassembler behaves. */
|
|
|
|
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);
|
|
|
|
#endif /* DISASM_FLAGS_H */
|
|
|