aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-10-27 10:58:00 -0600
committerTom Tromey <tromey@adacore.com>2023-11-21 14:52:05 -0700
commit3eac77a50024b49ee89436fa6f18c30ed64c3eeb (patch)
tree30639ba713680f73763b0dfee0449442c1a57847 /gdb/testsuite
parent5028c9e206efd6b92ecefe1afc9dcf5cd4ebb1a6 (diff)
downloadgdb-3eac77a50024b49ee89436fa6f18c30ed64c3eeb.zip
gdb-3eac77a50024b49ee89436fa6f18c30ed64c3eeb.tar.gz
gdb-3eac77a50024b49ee89436fa6f18c30ed64c3eeb.tar.bz2
Simplify C++ type-printing
The C++ type-printing code had its own variant of the accessibility enum. This patch removes this and changes the code to use the new one from gdbtypes.h. This patch also changes the C++ code to recognize the default accessibility of a class. This makes ptype a bit more C++-like, and lets us remove a chunk of questionable code. Acked-By: Simon Marchi <simon.marchi@efficios.com> Reviewed-by: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.base/ptype-offsets.exp6
1 files changed, 0 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.base/ptype-offsets.exp b/gdb/testsuite/gdb.base/ptype-offsets.exp
index 2cfc70f..f36bd2f 100644
--- a/gdb/testsuite/gdb.base/ptype-offsets.exp
+++ b/gdb/testsuite/gdb.base/ptype-offsets.exp
@@ -36,7 +36,6 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
gdb_test "ptype /o struct abc" \
[string_to_regexp [multi_line \
"/* offset | size */ type = struct abc \{" \
-" public:" \
"/* 8 | 8 */ void *field1;" \
"/* 16: 0 | 4 */ unsigned int field2 : 1;" \
"/* XXX 7-bit hole */" \
@@ -61,7 +60,6 @@ gdb_test "ptype /o struct abc" \
gdb_test "ptype /ox struct abc" \
[string_to_regexp [multi_line \
"/* offset | size */ type = struct abc {" \
-" public:" \
"/* 0x0008 | 0x0008 */ void *field1;" \
"/* 0x0010: 0x0 | 0x0004 */ unsigned int field2 : 1;" \
"/* XXX 7-bit hole */" \
@@ -86,7 +84,6 @@ gdb_test "ptype /ox struct abc" \
gdb_test "ptype /oTM struct abc" \
[string_to_regexp [multi_line \
"/* offset | size */ type = struct abc \{" \
-" public:" \
"/* 8 | 8 */ void *field1;" \
"/* 16: 0 | 4 */ unsigned int field2 : 1;" \
"/* XXX 7-bit hole */" \
@@ -116,7 +113,6 @@ gdb_test "ptype /oTM struct abc" \
gdb_test "ptype /TMo struct abc" \
[string_to_regexp [multi_line \
"/* offset | size */ type = struct abc \{" \
-" public:" \
"/* 8 | 8 */ void *field1;" \
"/* 16: 0 | 4 */ unsigned int field2 : 1;" \
"/* XXX 7-bit hole */" \
@@ -421,7 +417,6 @@ with_test_prefix "with_hex_default" {
gdb_test "ptype /o struct abc" \
[string_to_regexp [multi_line \
"/* offset | size */ type = struct abc \{" \
- " public:" \
"/* 0x0008 | 0x0008 */ void *field1;" \
"/* 0x0010: 0x0 | 0x0004 */ unsigned int field2 : 1;" \
"/* XXX 7-bit hole */" \
@@ -445,7 +440,6 @@ with_test_prefix "with_hex_default" {
gdb_test "ptype /od struct abc" \
[string_to_regexp [multi_line \
"/* offset | size */ type = struct abc \{" \
- " public:" \
"/* 8 | 8 */ void *field1;" \
"/* 16: 0 | 4 */ unsigned int field2 : 1;" \
"/* XXX 7-bit hole */" \