summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/data-formatter/data-formatter-cpp
AgeCommit message (Collapse)Author
2025-02-28[lldb] fix(lldb/**.py): fix invalid escape sequences (#94034)Eisuke Kawashima
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2024-12-17[lldb] Remove references to llvm-gcc (#120225)Michael Buch
The `llvm-gcc` front-end has been EOL'd at least since 2011 (based on some `git` archeology). And Clang/LLVM has been removing references to it ever since. This patch removes the remaining references to it from LLDB. One benefit of this is that it will allow us to remove the code checking for `DW_AT_decl_file_attributes_are_invalid` and `Supports_DW_AT_APPLE_objc_complete_type`.
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
2023-03-08[lldb][test][NFC] TestDataFormatterCpp.py: Remove redundant FIXMEMichael Buch
This got fixed in D145241 Differential Revision: https://reviews.llvm.org/D145241
2023-03-07Reland "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider ↵Michael Buch
for member-function pointers" With this patch member-function pointers are formatted using `CXXFunctionPointerSummaryProvider`. This turns, ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 ``` into ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 (a.out`Foo::member_func() at main.cpp:3) ``` Differential Revision: https://reviews.llvm.org/D145242
2023-03-07Reland "[lldb][TypeSystemClang] Format pointers to member functions as ↵Michael Buch
eFormatHex" Before this patch, LLDB used to format pointers to members, such as, ``` void (Foo::*pointer_to_member_func)() = &Foo::member_func; ``` as `eFormatBytes`. E.g., ``` (lldb) v pointer_to_member_func (void (Foo::*)()) $1 = 94 3f 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ``` This patch makes sure we format pointers to member functions the same way we do regular function pointers. After this patch we format member pointers as: ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 ``` Differential Revision: https://reviews.llvm.org/D145241
2023-03-07[lldb][test] TestDataFormatterCpp.py: set breakpoint after all locals have ↵Michael Buch
been initialized Differential Revision: https://reviews.llvm.org/D145487
2023-03-07[lldb][test] TestDataFormatterCpp.py: split assertions failing on WindowsMichael Buch
Differential Revision: https://reviews.llvm.org/D145487
2023-03-07[lldb][test] TestDataFormatterCpp.py: add test-case for member function ↵Michael Buch
pointer format This patch adds a test for formatting of member function pointers. This was split from https://reviews.llvm.org/D145242, which caused this test case to fail on Windows buildbots. I split this out in order to make sure that this indeed works on Windows without the D145242 patch. Differential Revision: https://reviews.llvm.org/D145487
2023-03-07Revert "[lldb][TypeSystemClang] Format pointers to member functions as ↵Michael Buch
eFormatHex" Reverted because Windows buildbot started failing This reverts commit b642fd5ee250247ccefb38099169b4ee8ac4112b.
2023-03-07Revert "[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider ↵Michael Buch
for member-function pointers" Reverted because Windows buildbot started failing This reverts commit 6bd46e713c6d8deda7bdae8b1efadb99c88b4443.
2023-03-03[lldb][TypeSystemClang] Use the CXXFunctionPointerSummaryProvider for ↵Michael Buch
member-function pointers With this patch member-function pointers are formatted using `CXXFunctionPointerSummaryProvider`. This turns, ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 ``` into ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 (a.out`Foo::member_func() at main.cpp:3) ``` Differential Revision: https://reviews.llvm.org/D145242
2023-03-03[lldb][TypeSystemClang] Format pointers to member functions as eFormatHexMichael Buch
Before this patch, LLDB used to format pointers to members, such as, ``` void (Foo::*pointer_to_member_func)() = &Foo::member_func; ``` as `eFormatBytes`. E.g., ``` (lldb) v pointer_to_member_func (void (Foo::*)()) $1 = 94 3f 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ``` This patch makes sure we format pointers to member functions the same way we do regular function pointers. After this patch we format member pointers as: ``` (lldb) v pointer_to_member_func (void (Foo::*)()) ::pointer_to_member_func = 0x00000000000000000000000100003f94 ``` Differential Revision: https://reviews.llvm.org/D145241
2023-01-25[lldb][test] Replace use of p with expression (NFC)Dave Lee
In API tests, replace use of the `p` alias with the `expression` command. To avoid conflating tests of the alias with tests of the expression command, this patch canonicalizes to the use `expression`. Differential Revision: https://reviews.llvm.org/D141539
2022-10-14[lldb] Start from end of previous substr when checking ordered substrsArthur Eubanks
I'm trying to add a test which tests that the same substr occurs twice in a row, but it matches even if only one of the substr occurs. This found a bug in concurrent_base.py. Reviewed By: DavidSpickett Differential Revision: https://reviews.llvm.org/D135826
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-11-01[lldb][gmodules] Fix TestDataFormatterCpp with gmodules on macOSRaphael Isemann
'Point' is actually a system type defined on macOS.
2021-10-29Cleanup a few more PR36048 skipsDavid Blaikie
Hopefully these were also fixed bi r343545 / 7fd4513920d2fed533ad420976529ef43eb42a35 Differential Revision: https://reviews.llvm.org/D112165
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-20[lldb] Remove license headers from all test source filesRaphael Isemann
Summary: Around a third of our test sources have LLVM license headers. This patch removes those headers from all test sources and also fixes any tests that depended on the length of the license header. The reasons for this are: * A few tests verify line numbers and will start failing if the number of lines in the LLVM license header changes. Once I landed my patch for valid SourceLocations in debug info we will probably have even more tests that verify line numbers. * No other LLVM project is putting license headers in its test files to my knowledge. * They make the test sources much more verbose than they have to be. Several tests have longer license headers than the actual test source. For the record, the following tests had their line numbers changed to pass with the removal of the license header: lldb-api :: functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py lldb-shell :: Reproducer/TestGDBRemoteRepro.test lldb-shell :: Reproducer/TestMultipleTargets.test lldb-shell :: Reproducer/TestReuseDirectory.test lldb-shell :: ExecControl/StopHook/stop-hook-threads.test lldb-shell :: ExecControl/StopHook/stop-hook.test lldb-api :: lang/objc/exceptions/TestObjCExceptions.py Reviewers: #lldb, espindola, JDevlieghere Reviewed By: #lldb, JDevlieghere Subscribers: emaste, aprantl, arphaman, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D74839
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