diff options
author | Bruno Larsen <blarsen@redhat.com> | 2022-09-07 15:48:08 +0200 |
---|---|---|
committer | Bruno Larsen <blarsen@redhat.com> | 2022-11-11 10:13:25 +0100 |
commit | 729421925aee0e5b0954e062d757ad917fc02838 (patch) | |
tree | a0aa2472e93d8f583953987739924014f8d39fc8 /gdb/nat/gdb_ptrace.h | |
parent | 9e9ffe8ee6c986e6788ad08b5635091e1f49b376 (diff) | |
download | gdb-729421925aee0e5b0954e062d757ad917fc02838.zip gdb-729421925aee0e5b0954e062d757ad917fc02838.tar.gz gdb-729421925aee0e5b0954e062d757ad917fc02838.tar.bz2 |
gdb/testsuite: enable running gdb.cp/classes.exp with clang
When attempting to run the gdb.cp/classes.exp test using Clang++, the
test fails to prepare with -Wnon-c-typedef-for-linkage like the
previously fixed gdb.cp/class2.exp. Upon fixing this, the test shows 5
unexpected failures. One such failures is:
ptype/r class class_with_public_typedef
type = class class_with_public_typedef {
private:
int a;
public:
class_with_public_typedef::INT b;
private:
typedef int INT;
}
(gdb) FAIL: gdb.cp/classes.exp: ptype class class_with_public_typedef // wrong access specifier for typedef: private
While g++ provided the following output:
ptype/r class class_with_public_typedef
type = class class_with_public_typedef {
private:
int a;
public:
class_with_public_typedef::INT b;
typedef int INT;
}
(gdb) PASS: gdb.cp/classes.exp: ptype class class_with_public_typedef
This error happens because Clang does not add DW_AT_accessibility to
typedefs inside classes, and without this information GDB defaults to
assuming the typedef is private. Since there is nothing that GDB can do
about this, these tests have been set as xfails, and Clang bug 57608 has
been filed.
Bug: https://github.com/llvm/llvm-project/issues/57608
Approved-by: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/nat/gdb_ptrace.h')
0 files changed, 0 insertions, 0 deletions