llvm-project/lldb/test/Shell/Settings/TestFrameFormatFunctionScope.test
Michael Buch da7099290c
Revert "[lldb][Format] Make function name frame-format variables work without debug-info" (#137757)
Reverts llvm/llvm-project#137408

This change broke `lldb/test/Shell/Unwind/split-machine-functions.test`.

The test binary has a symbol named `_Z3foov.cold` and the test expects
the backtrace to print the name of the cold part of the function like
this:

```
# SPLIT: frame #1: {{.*}}`foo() (.cold) +
```
but now it gets

```
frame #1: 0x000055555555514f split-machine-functions.test.tmp`foo() + 12
```
2025-04-29 07:13:04 +01:00

44 lines
837 B
Plaintext

# XFAIL: target-windows
# Test the ${function.scope} frame-format variable.
# RUN: split-file %s %t
# RUN: %clang_host -g -gdwarf %t/main.cpp -o %t.out
# RUN: %lldb -o "settings set interpreter.stop-command-source-on-error false" \
# RUN: -x -b -s %t/commands.input %t.out -o exit 2>&1 \
# RUN: | FileCheck %s
#--- main.cpp
namespace ns::ns2 {
inline namespace ins {
template <typename T>
struct Foo {
void func() {}
};
int foo() {
Foo<int>{}.func();
return 5;
}
} // namespace ins
} // namespace ns::ns2
using namespace ns::ns2;
int bar() {
return ns::ns2::foo();
}
int main() { return bar(); }
#--- commands.input
settings set -f frame-format "custom-frame '${function.scope}'\n"
break set -n func
run
bt
# CHECK: frame 'ns::ns2::ins::Foo<int>::'
# CHECK: frame 'ns::ns2::ins::'
# CHECK: frame ''