On 02/10/2017 09:12 PM, Simon Marchi wrote:
diff --git a/gdb/disasm.h b/gdb/disasm.h
index 42c1f3af6d..bb7a7a0d5c 100644
--- a/gdb/disasm.h
+++ b/gdb/disasm.h
@@ -21,13 +21,17 @@
#include "dis-asm.h"
-#define DISASSEMBLY_SOURCE_DEPRECATED (0x1 << 0)
-#define DISASSEMBLY_RAW_INSN (0x1 << 1)
-#define DISASSEMBLY_OMIT_FNAME (0x1 << 2)
-#define DISASSEMBLY_FILENAME (0x1 << 3)
-#define DISASSEMBLY_OMIT_PC (0x1 << 4)
-#define DISASSEMBLY_SOURCE (0x1 << 5)
-#define DISASSEMBLY_SPECULATIVE (0x1 << 6)
+enum disassembly_flag {
+ DISASSEMBLY_SOURCE_DEPRECATED = (1 << 0),
+ DISASSEMBLY_RAW_INSN = (1 << 1),
+ DISASSEMBLY_OMIT_FNAME = (1 << 2),
+ DISASSEMBLY_FILENAME = (1 << 3),
+ DISASSEMBLY_OMIT_PC = (1 << 4),
+ DISASSEMBLY_SOURCE = (1 << 5),
+ DISASSEMBLY_SPECULATIVE = (1 << 6),
+};
Since we're touching this already, wouldn't it be slightly better to
have all of the above in lowercase instead of uppercase? They look
like #defined-ed constants otherwise.