7 Commits

Author SHA1 Message Date
Raul Tambre
21041c9292
[NFCI][lldb][test] Fix mismatched C/C++ substitutions (#165773)
Most of the cases were where a C++ file was being compiled with the C substitution.
There were a few cases of the opposite though.

LLDB seems to be the only real culprit in the LLVM codebase for these mismatches.
Rest of the LLVM presumably sticks at least language-specific options in the common substitutions
making the mistakes immediately apparent.

I found these by using Clang frontend configuration files containing language-specific options for
both C and C++ (e.g. `-std=c2y` and `-std=c++26`).
2025-10-30 23:18:32 +02:00
Michael Buch
d605a0d70e [lldb][test] FrameFormat tests: Specify filename when setting breakpoints
Try to work around following error on some of the Linux CI:
```
            8: (lldb) settings set -f frame-format "custom-frame '${function.basename}'\n"
check:50'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:50'1                                          ?                                       possible intended match
            9: (lldb) break set -l 5
check:50'0     ~~~~~~~~~~~~~~~~~~~~~~
           10: error: No selected frame to use to find the default file.
check:50'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           11: error: No file supplied and no default file available.
check:50'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           12: (lldb) exit
check:50'0     ~~~~~~~~~~~~
```
2025-04-27 11:21:01 +01:00
Michael Buch
3f5dc586ef [lldb][test] XFAIL TestCxxFrameFormat.test for Windows target
Fails on Windows CI:
```
|            10: (lldb) break set -l 3
| check:30'0     ~~~~~~~~~~~~~~~~~~~~~~
|            11: error: No selected frame to use to find the default file.
| check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|            12: error: No file supplied and no default file available.
| check:30'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|            13: (lldb) exit
```

This passes fine when compiling on Windows for Linux targets.
2025-04-26 18:40:53 +01:00
Michael Buch
8a5bc9e340 [lldb][test] Un-XFAIL TestCxxFrameFormat.test for now
This was XPASSing on the linux-win remote CI jobs.
Since we're now compiling with DWARF (not PDB), lets see if these pass
on Windows again.
2025-04-26 13:04:23 +01:00
Michael Buch
7581aa1d8e [lldb][test] Make sure we compile FrameFormat tests with DWARF
These don't make sense for PDB on Windows
2025-04-26 11:28:32 +01:00
Michael Buch
e6f7e3418e [lldb][test] Fix/XFAIL FrameFormat tests on Windows
All of these were failing on Windows CI. Some are failing because
breakpoints on template functions can't be set by name. Others are
failing because of slight textual differences. Most are failing because
we can't track components of a mangled name from PDB, so XFAIL those.
2025-04-26 08:56:16 +01:00
Michael Buch
d555b9f9a0 [lldb][CPlusPlus] Add plugin.cplusplus.display.function-name-format setting (#131836)
Adds the new `plugin.cplusplus.display.function-name-format` setting and makes the `${function.name-with-args}` query it for formatting the function name.

One caveat is that the setting can't itself be set to `${function.name-with-args}` because that would cause infinite recursion and blow the stack. I added an XFAILed test-case for it and will address it in a follow-up patch.

https://github.com/llvm/llvm-project/pull/131836
2025-04-25 10:04:27 +01:00