gdb
PR python/13281: * gdbtypes.h (TYPE_FLAG_ENUM): New macro. (struct main_type) <flag_flag_enum>: New field. * dwarf2read.c (process_enumeration_scope): Detect "flag" enums. * NEWS: Add entries. * c-valprint.c (c_val_print) <TYPE_CODE_ENUM>: Handle "flag" enums. * python/lib/gdb/printing.py (_EnumInstance): New class. (FlagEnumerationPrinter): Likewise. gdb/doc * gdb.texinfo (gdb.printing): Document FlagEnumerationPrinter. gdb/testsuite * gdb.base/printcmds.c (enum flag_enum): New. (three): New global. * gdb.base/printcmds.exp (test_print_enums): Add test for flag enum printing. * gdb.python/py-pp-maint.py (build_pretty_printer): Instantiate FlagEnumerationPrinter. * gdb.python/py-pp-maint.exp: Add tests for FlagEnumerationPrinter. * gdb.python/py-pp-maint.c (enum flag_enum): New. (fval): New global.
This commit is contained in:
parent
983af33b26
commit
cafec44190
14 changed files with 199 additions and 13 deletions
|
@ -17,6 +17,16 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
enum flag_enum
|
||||
{
|
||||
FLAG_1 = 1,
|
||||
FLAG_2 = 2,
|
||||
FLAG_3 = 4,
|
||||
ALL = FLAG_1 | FLAG_2 | FLAG_3
|
||||
};
|
||||
|
||||
enum flag_enum fval;
|
||||
|
||||
struct function_lookup_test
|
||||
{
|
||||
int x,y;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue