See https://github.com/llvm/llvm-project/issues/188957 Fails with following error on the `cross-project-tests-sie-ubuntu-dwarf5` builder: ``` ******************** TEST 'cross-project-tests :: debuginfo-tests/llgdb-tests/sret.cpp' FAILED ******************** Exit Code: 1 Command Output (stdout): -- Running debugger Running FileCheck Debugger output was: Breakpoint 1 at 0x11fb: file /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp, line 64. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Breakpoint 1, B::AInstance (this=0x7fffffffe6ef) at /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp:64 64 A a(12); $1 = {_vptr$A = 0x0, m_int = 0, static __clang_vtable = <optimized out>} A debugging session is active. Inferior 1 [process 1110596] will be killed. Quit anyway? (y or n) [answered Y; input not from terminal] -- Command Output (stderr): -- /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/bin/clang --driver-mode=g++ --target=x86_64-unknown-linux-gnu -O0 -g /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp -c -o /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/projects/cross-project-tests/debuginfo-tests/llgdb-tests/Output/sret.cpp.tmp.o # RUN: at line 4 + /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/bin/clang --driver-mode=g++ --target=x86_64-unknown-linux-gnu -O0 -g /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp -c -o /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/projects/cross-project-tests/debuginfo-tests/llgdb-tests/Output/sret.cpp.tmp.o /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/bin/clang --driver-mode=g++ --target=x86_64-unknown-linux-gnu /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/projects/cross-project-tests/debuginfo-tests/llgdb-tests/Output/sret.cpp.tmp.o -o /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/projects/cross-project-tests/debuginfo-tests/llgdb-tests/Output/sret.cpp.tmp.out # RUN: at line 5 + /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/bin/clang --driver-mode=g++ --target=x86_64-unknown-linux-gnu /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/projects/cross-project-tests/debuginfo-tests/llgdb-tests/Output/sret.cpp.tmp.o -o /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/projects/cross-project-tests/debuginfo-tests/llgdb-tests/Output/sret.cpp.tmp.out PYTHON_EXEC_PATH=/usr/bin/python3.10 LLDB_PYTHON_PATH=/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/./lib/python3.10/site-packages /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/cross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/projects/cross-project-tests/debuginfo-tests/llgdb-tests/Output/sret.cpp.tmp.out # RUN: at line 6 + PYTHON_EXEC_PATH=/usr/bin/python3.10 + LLDB_PYTHON_PATH=/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/./lib/python3.10/site-packages + /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/cross-project-tests/debuginfo-tests/llgdb-tests/test_debuginfo.pl /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/projects/cross-project-tests/debuginfo-tests/llgdb-tests/Output/sret.cpp.tmp.out /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp:14:11: error: CHECK: expected string not found in input // CHECK: {{(_vptr\$A =)?.*}}m_int = 12 ^ /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/projects/cross-project-tests/debuginfo-tests/llgdb-tests/Output/sret.cpp.gdb.output:7:5: note: scanning from here $1 = {_vptr$A = 0x0, m_int = 0, static __clang_vtable = <optimized out>} ^ /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/projects/cross-project-tests/debuginfo-tests/llgdb-tests/Output/sret.cpp.gdb.output:7:6: note: possible intended match here $1 = {_vptr$A = 0x0, m_int = 0, static __clang_vtable = <optimized out>} ^ Input file: /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/projects/cross-project-tests/debuginfo-tests/llgdb-tests/Output/sret.cpp.gdb.output Check file: /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp -dump-input=help explains the following input dump. Input was: <<<<<< 1: Breakpoint 1 at 0x11fb: file /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp, line 64. 2: [Thread debugging using libthread_db enabled] 3: Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". 4: 5: Breakpoint 1, B::AInstance (this=0x7fffffffe6ef) at /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/cross-project-tests/debuginfo-tests/llgdb-tests/sret.cpp:64 6: 64 A a(12); 7: $1 = {_vptr$A = 0x0, m_int = 0, static __clang_vtable = <optimized out>} check:12 ^~~~ check:14'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found check:14'1 ? possible intended match 8: A debugging session is active. check:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 9: check:14'0 ~ 10: Inferior 1 [process 1110596] will be killed. check:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 11: check:14'0 ~ 12: Quit anyway? (y or n) [answered Y; input not from terminal] check:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >>>>>> -- ```
79 lines
1.1 KiB
C++
79 lines
1.1 KiB
C++
// REQUIRES: system-darwin || has-gdb
|
|
// XFAIL: system-darwin
|
|
//
|
|
// TODO: llvm-project/issues/188957
|
|
// UNSUPPORTED: system-linux
|
|
//
|
|
// RUN: %clangxx %target_itanium_abi_host_triple -O0 -g %s -c -o %t.o
|
|
// RUN: %clangxx %target_itanium_abi_host_triple %t.o -o %t.out
|
|
// RUN: %test_debuginfo %s %t.out
|
|
// XFAIL: !system-darwin && gdb-clang-incompatibility
|
|
// Radar 8775834
|
|
// DEBUGGER: break 63
|
|
// DEBUGGER: r
|
|
// DEBUGGER: p a
|
|
// CHECK: ${{[0-9]+}} =
|
|
// LLDB does not print artificial members.
|
|
// CHECK: {{(_vptr\$A =)?.*}}m_int = 12
|
|
|
|
class A
|
|
{
|
|
public:
|
|
A (int i=0);
|
|
A (const A& rhs);
|
|
const A&
|
|
operator= (const A& rhs);
|
|
virtual ~A() {}
|
|
|
|
int get_int();
|
|
|
|
protected:
|
|
int m_int;
|
|
};
|
|
|
|
A::A (int i) :
|
|
m_int(i)
|
|
{
|
|
}
|
|
|
|
A::A (const A& rhs) :
|
|
m_int (rhs.m_int)
|
|
{
|
|
}
|
|
|
|
const A &
|
|
A::operator =(const A& rhs)
|
|
{
|
|
m_int = rhs.m_int;
|
|
return *this;
|
|
}
|
|
|
|
int A::get_int()
|
|
{
|
|
return m_int;
|
|
}
|
|
|
|
class B
|
|
{
|
|
public:
|
|
B () {}
|
|
|
|
A AInstance();
|
|
};
|
|
|
|
A
|
|
B::AInstance()
|
|
{
|
|
A a(12);
|
|
return a;
|
|
}
|
|
|
|
int main (int argc, char const *argv[])
|
|
{
|
|
B b;
|
|
int return_val = b.AInstance().get_int();
|
|
|
|
A a(b.AInstance());
|
|
return return_val;
|
|
}
|