summaryrefslogtreecommitdiff
path: root/lldb/test/API/lang/cpp/char8_t
AgeCommit message (Collapse)Author
2025-06-27[lldb] Fix evaluating expressions without JIT in an object context (#145599)Igor Kudrin
If a server does not support allocating memory in an inferior process or when debugging a core file, evaluating an expression in the context of a value object results in an error: ``` error: <lldb wrapper prefix>:43:1: use of undeclared identifier '$__lldb_class' 43 | $__lldb_class::$__lldb_expr(void *$__lldb_arg) | ^ ``` Such expressions require a live address to be stored in the value object. However, `EntityResultVariable::Dematerialize()` only sets `ret->m_live_sp` if JIT is available, even if the address points to the process memory and no custom allocations were made. Similarly, `EntityPersistentVariable::Dematerialize()` tries to deallocate memory based on the same check, resulting in an error if the memory was not previously allocated in `EntityPersistentVariable::Materialize()`. As an unintended bonus, the patch also fixes a FIXME case in `TestCxxChar8_t.py`.
2024-06-12[lldb] Fix linker flags in lldb testsFelipe de Azevedo Piovezan
This is a fixup to https://github.com/llvm/llvm-project/pull/93808, which used LDFLAGS instead of the correct LD_EXTRAS
2024-06-12[lldb][test] Disable PIE for some API tests (#93808)Vladislav Dzhidzhoev
When PIE is enabled on a platform by default, these tests fail since the `target variable` command can't read a global string variable value before running an inferior process. It fixes the following tests when built with clang on Ubuntu aarch64: ``` commands/target/basic/TestTargetCommand.py lang/c/global_variables/TestGlobalVariables.py lang/cpp/char8_t/TestCxxChar8_t.py ```
2023-05-25[NFC][Py Reformat] Reformat python files in lldbJonas Devlieghere
This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with `black` (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run `git checkout --ours <yourfile>` and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460
2022-08-12[lldb] Skip target variable tests on Darwin because of chained fixupsJonas Devlieghere
When targeting macOS Ventura, ld64 will use authenticated fixups for x86_64 as well as arm64 (where that has always been the case). This results in test failures when using an Xcode 14 toolchain on an Intel mac running macOS Ventura: Failed Tests (3): lldb-api :: commands/target/basic/TestTargetCommand.py lldb-api :: lang/c/global_variables/TestGlobalVariables.py lldb-api :: lang/cpp/char8_t/TestCxxChar8_t.py Rather than trying to come up with a sophisticated decorator based off the deployment target, I marked them all as skipped with a comment explaining why. Differential revision: https://reviews.llvm.org/D131741
2022-06-17[lldb][tests] Automatically call compute_mydir (NFC)Dave Lee
Eliminate boilerplate of having each test manually assign to `mydir` by calling `compute_mydir` in lldbtest.py. Differential Revision: https://reviews.llvm.org/D128077
2021-12-01[lldb] Split TestCxxChar8_tJonas Devlieghere
Split TestCxxChar8_t into two parts: one that check reading variables without a process and another part with. This allows us to skip the former on Apple Silicon, where lack of support for chained fix-ups causes the test to fail. Differential revision: https://reviews.llvm.org/D114819
2021-11-18[lldb] (Partially) enable formatting of utf strings before the program is ↵Pavel Labath
started The StringPrinter class was using a Process instance to read memory. This automatically prevented it from working before starting the program. This patch changes the class to use the Target object for reading memory, as targets are always available. This required moving ReadStringFromMemory from Process to Target. This is sufficient to make frame/target variable work, but further changes are necessary for the expression evaluator. Preliminary analysis indicates the failures are due to the expression result ValueObjects failing to provide an address, presumably because we're operating on file addresses before starting. I haven't looked into what would it take to make that work. Differential Revision: https://reviews.llvm.org/D113098
2021-10-21Recommit: Compress formatting of array type names (int [4] -> int[4])David Blaikie
Based on post-commit review discussion on 2bd84938470bf2e337801faafb8a67710f46429d with Richard Smith. Other uses of forcing HasEmptyPlaceHolder to false seem OK to me - they're all around pointer/reference types where the pointer/reference token will appear at the rightmost side of the left side of the type name, so they make nested types (eg: the "int" in "int *") behave as though there is a non-empty placeholder (because the "*" is essentially the placeholder as far as the "int" is concerned). This was originally committed in 277623f4d5a672d707390e2c3eaf30a9eb4b075c Reverted in f9ad1d1c775a8e264bebc15d75e0c6e5c20eefc7 due to breakages outside of clang - lldb seems to have some strange/strong dependence on "char [N]" versus "char[N]" when printing strings (not due to that name appearing in DWARF, but probably due to using clang to stringify type names) that'll need to be addressed, plus a few other odds and ends in other subprojects (clang-tools-extra, compiler-rt, etc).
2020-02-19[lldb][NFC] Modernize test setup code in several lang/cpp testsRaphael Isemann
All these tests can just call lldbutil.run_to_source_breakpoint instead of reimplementing it.
2020-02-11[lldb][test] Remove symlink for API tests.Jordan Rupprecht
Summary: Moves lldbsuite tests to lldb/test/API. This is a largely mechanical change, moved with the following steps: ``` rm lldb/test/API/testcases mkdir -p lldb/test/API/{test_runner/test,tools/lldb-{server,vscode}} mv lldb/packages/Python/lldbsuite/test/test_runner/test lldb/test/API/test_runner for d in $(find lldb/packages/Python/lldbsuite/test/* -maxdepth 0 -type d | egrep -v "make|plugins|test_runner|tools"); do mv $d lldb/test/API; done for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-vscode -maxdepth 1 -mindepth 1 | grep -v ".py"); do mv $d lldb/test/API/tools/lldb-vscode; done for d in $(find lldb/packages/Python/lldbsuite/test/tools/lldb-server -maxdepth 1 -mindepth 1 | egrep -v "gdbremote_testcase.py|lldbgdbserverutils.py|socket_packet_pump.py"); do mv $d lldb/test/API/tools/lldb-server; done ``` lldb/packages/Python/lldbsuite/__init__.py and lldb/test/API/lit.cfg.py were also updated with the new directory structure. Reviewers: labath, JDevlieghere Tags: #lldb Differential Revision: https://reviews.llvm.org/D71151