aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-09-21 10:21:04 -0600
committerTom Tromey <tromey@adacore.com>2023-11-21 14:52:05 -0700
commit61461a5b41fb660ef11a7a9ffe457ea52b5c2a6a (patch)
tree1455a4495a78e319930a706c1dc6cf30689f248c /gdb/gdbtypes.c
parent5ffb4736f079c3dbc01be4b6cb961a60094ee18f (diff)
downloadgdb-61461a5b41fb660ef11a7a9ffe457ea52b5c2a6a.zip
gdb-61461a5b41fb660ef11a7a9ffe457ea52b5c2a6a.tar.gz
gdb-61461a5b41fb660ef11a7a9ffe457ea52b5c2a6a.tar.bz2
Remove byte vectors from cplus_struct_type
This removes some byte vectors from cplus_struct_type, moving the information into bitfields in holes in struct field. A new 'enum accessibility' is added to hold some of this information. A similar enum is removed from c-varobj.c. Note that the stabs reader treats "ignored" as an accessibility. However, the stabs texinfo documents this as a public field that is optimized out -- unfortunately nobody has updated the stabs reader to use the better value-based optimized-out machinery. I looked and apparently gcc never emitted this visibility value, so whatever compiler generated this stab is unknown. I left a comment in gdbtypes.h to this effect. Acked-By: Simon Marchi <simon.marchi@efficios.com> Reviewed-by: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb/gdbtypes.c')
-rw-r--r--gdb/gdbtypes.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 1b49628..8468b9a 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -4883,25 +4883,6 @@ rank_one_type (struct type *parm, struct type *arg, struct value *value)
/* End of functions for overload resolution. */
-/* Routines to pretty-print types. */
-
-static void
-print_bit_vector (B_TYPE *bits, int nbits)
-{
- int bitno;
-
- for (bitno = 0; bitno < nbits; bitno++)
- {
- if ((bitno % 8) == 0)
- {
- gdb_puts (" ");
- }
- if (B_TST (bits, bitno))
- gdb_printf (("1"));
- else
- gdb_printf (("0"));
- }
-}
/* Note the first arg should be the "this" pointer, we may not want to
include it since we may get into a infinitely recursive
@@ -5004,40 +4985,6 @@ print_cplus_stuff (struct type *type, int spaces)
TYPE_N_BASECLASSES (type));
gdb_printf ("%*snfn_fields %d\n", spaces, "",
TYPE_NFN_FIELDS (type));
- if (TYPE_N_BASECLASSES (type) > 0)
- {
- gdb_printf
- ("%*svirtual_field_bits (%d bits at *%s)",
- spaces, "", TYPE_N_BASECLASSES (type),
- host_address_to_string (TYPE_FIELD_VIRTUAL_BITS (type)));
-
- print_bit_vector (TYPE_FIELD_VIRTUAL_BITS (type),
- TYPE_N_BASECLASSES (type));
- gdb_puts ("\n");
- }
- if (type->num_fields () > 0)
- {
- if (TYPE_FIELD_PRIVATE_BITS (type) != NULL)
- {
- gdb_printf
- ("%*sprivate_field_bits (%d bits at *%s)",
- spaces, "", type->num_fields (),
- host_address_to_string (TYPE_FIELD_PRIVATE_BITS (type)));
- print_bit_vector (TYPE_FIELD_PRIVATE_BITS (type),
- type->num_fields ());
- gdb_puts ("\n");
- }
- if (TYPE_FIELD_PROTECTED_BITS (type) != NULL)
- {
- gdb_printf
- ("%*sprotected_field_bits (%d bits at *%s",
- spaces, "", type->num_fields (),
- host_address_to_string (TYPE_FIELD_PROTECTED_BITS (type)));
- print_bit_vector (TYPE_FIELD_PROTECTED_BITS (type),
- type->num_fields ());
- gdb_puts ("\n");
- }
- }
if (TYPE_NFN_FIELDS (type) > 0)
{
dump_fn_fieldlists (type, spaces);