summaryrefslogtreecommitdiff
path: root/gdb/p-valprint.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2006-01-18 21:24:19 +0000
committerMark Kettenis <kettenis@gnu.org>2006-01-18 21:24:19 +0000
commit1ebfd7eed07db96b5f597fda8c87ec43dc0e0c07 (patch)
tree6c0d2ff5d8bfa0103c549010550a695a3426cd17 /gdb/p-valprint.c
parent450f00440dc3da01610f8c7d129b074c071a86b0 (diff)
downloadgdb-1ebfd7eed07db96b5f597fda8c87ec43dc0e0c07.tar.gz
Based on a previous patch form Michal Ludvig:
* gdbtypes.c (append_flags_type_flag, init_flags_type): New functions. (is_integral_type, rank_one_type, recursive_dump_type): Add support for TYPE_CODE_FLAGS. * gdbtypes.h (enum type_code): Add TYPE_CODE_FLAGS. (append_flags_type_field, init_flags_type): New prototypes. * ada-valprint.c (ada_val_print_1): Add support for TYPE_CODE_FLAGS. * c-valprint.c (c_val_print): Likewise. * f-valprint.c (f_val_print): Likewise. * p-valprint.c (pascal_val_print): Likewise. * valprint.c (val_print_type_code_flags): New function. * valprint.h (val_print_type_code_flags): New prototype. * value.c (unpack_long, value_from_longest): Add support for TYPE_CODE_FLAGS.
Diffstat (limited to 'gdb/p-valprint.c')
-rw-r--r--gdb/p-valprint.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c
index 72be1f508c4..9eef4f7d9a0 100644
--- a/gdb/p-valprint.c
+++ b/gdb/p-valprint.c
@@ -1,6 +1,7 @@
/* Support for printing Pascal values for GDB, the GNU debugger.
- Copyright (C) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001, 2003, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of GDB.
@@ -359,6 +360,13 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr,
}
break;
+ case TYPE_CODE_FLAGS:
+ if (format)
+ print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
+ else
+ val_print_type_code_flags (type, valaddr + embedded_offset, stream);
+ break;
+
case TYPE_CODE_FUNC:
if (format)
{