summaryrefslogtreecommitdiff
path: root/lldb/test/Shell/SymbolFile/NativePDB/Inputs
AgeCommit message (Collapse)Author
2025-09-02[LLDB][NativePDB] Complete array member types in AST builder (#156370)nerix
2025-07-17[lldb] Adjust default target.max-children-depth (#149282)Michael Buch
Deeply nested structs can be noisy, so Apple's LLDB fork sets the default to `4`: https://github.com/swiftlang/llvm-project/blob/9c93adbb283005ab416fd155b75fd43e6a8288ca/lldb/source/Target/TargetProperties.td#L134-L136 Thought it would be useful to upstream this. Though happy to pick a different default or keep it as-is.
2024-10-18Revert "Renormalize line endings whitespace only after dccebddb3b80"Luke Drummond
This reverts commit 9d98acb196a40fee5229afeb08f95fd36d41c10a.
2024-10-17Renormalize line endings whitespace only after dccebddb3b80Luke Drummond
Line ending policies were changed in the parent, dccebddb3b80. To make it easier to resolve downstream merge conflicts after line-ending policies are adjusted this is a separate whitespace-only commit. If you have merge conflicts as a result, you can simply `git add --renormalize -u && git merge --continue` or `git add --renormalize -u && git rebase --continue` - depending on your workflow.
2023-03-17[lldb][test] Replace use of p with expression in Shell tests (NFC)Dave Lee
In Shell 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`. See also D141539 which made the same change to API tests. Differential Revision: https://reviews.llvm.org/D146230
2022-11-16[LLDB][NativePDB] Forcefully complete a record type if it has empty debug ↵Zequan Wu
info and is required to have complete type. It's required in following situations: 1. As a base class. 2. As a data member. 3. As an array element type. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D134066
2022-10-13[LLDB][NativePDB] Fix struct layout when it has anonymous unions.Zequan Wu
Previously, lldb mistook fields in anonymous union in a struct as the direct field of the struct, which causes lldb crashes due to multiple fields sharing the same offset in a struct. This patch fixes it. MSVC generated pdb doesn't have the debug info entity representing a anonymous union in a struct. It looks like the following: ``` struct S { union { char c; int i; }; }; 0x1004 | LF_FIELDLIST [size = 40] - LF_MEMBER [name = `c`, Type = 0x0070 (char), offset = 0, attrs = public] - LF_MEMBER [name = `i`, Type = 0x0074 (int), offset = 0, attrs = public] 0x1005 | LF_STRUCTURE [size = 32] `S` unique name: `.?AUS@@` vtable: <no type>, base list: <no type>, field list: 0x1004 ``` Clang generated pdb is similar, though due to the [[ https://github.com/llvm/llvm-project/issues/57999 | bug ]], it's not more useful than the debug info above. But that's not very relavent, lldb should still be able to understand MSVC geneerated pdb. ``` 0x1003 | LF_UNION [size = 60] `S::<unnamed-tag>` unique name: `.?AT<unnamed-type-$S1>@S@@` field list: <no type> options: forward ref (= 0x1003) | has unique name | is nested, sizeof 0 0x1004 | LF_FIELDLIST [size = 40] - LF_MEMBER [name = `c`, Type = 0x0070 (char), offset = 0, attrs = public] - LF_MEMBER [name = `i`, Type = 0x0074 (int), offset = 0, attrs = public] - LF_NESTTYPE [name = ``, parent = 0x1003] 0x1005 | LF_STRUCTURE [size = 32] `S` unique name: `.?AUS@@` vtable: <no type>, base list: <no type>, field list: 0x1004 options: contains nested class | has unique name, sizeof 4 0x1006 | LF_FIELDLIST [size = 28] - LF_MEMBER [name = `c`, Type = 0x0070 (char), offset = 0, attrs = public] - LF_MEMBER [name = `i`, Type = 0x0074 (int), offset = 0, attrs = public] 0x1007 | LF_UNION [size = 60] `S::<unnamed-tag>` unique name: `.?AT<unnamed-type-$S1>@S@@` field list: 0x1006 options: has unique name | is nested | sealed, sizeof ``` This patch delays the FieldDecl creation when travesing LF_FIELDLIST so we know if there are multiple fields are in the same offsets and are able to group them into different anonymous unions based on offsets. Nested anonymous union will be flatten into one anonymous union, because we simply don't have that info, but they are equivalent in terms of union layout. Differential Revision: https://reviews.llvm.org/D134849
2022-08-17[LLDB][NativePDB] Switch to use DWARFLocationList.Zequan Wu
Before, NativePDB uses scoped range as a workaround for value range, that causes problems (e.g. a variable's value can only have one range, but usually a variable's value is located at different address ranges, each at different locations, in optimized build). This patch let NativePDB switch to DWARFLocationList so a variable's value can be described at multiple non-overlapped address ranges and each range maps to a location. Because overlapping ranges exists, here's peference when choosing ranges: 1. Always prefer whole value locations. Suppose a variable size is 8 bytes, one record is that for range [1, 5) first 4 bytes is at ecx, and another record is that for range [2, 8) the 8 bytes value is at rdx. This results: [1, 2) has first 4 bytes at ecx, [2, 8) has the whole value at rdx. 2. Always prefer the locations parsed later. Suppose first record is that for range [1, 5) value is at ecx, second record is that for range [2, 6) value is at eax. This results: [1, 2) -> ecx, [2, 6) -> eax. Differential Revision: https://reviews.llvm.org/D130796
2022-07-19[LLDB][NativePDB] Add MSInheritanceAttr when creating pointer type that is a ↵Zequan Wu
pointer to member. Differential Revision: https://reviews.llvm.org/D129807
2022-07-12[LLDB] Fix NativePDB/local-variables.cpp for AArch64/WindowsMuhammad Omair Javaid
This patch fixes NativePDB/local-variables.cpp test for AArch64 Windows. There are two changes: 1) Replace function breakpoint with line breakpoint required due to pr56288 2) Adjust "target modules dump ast" test as the output was slightly different on AArch64/Windows.
2022-04-14[LLDB][NativePDB] Fix a crash when S_DEFRANGE_SUBFIELD_REGISTER descirbes a ↵Zequan Wu
simple type When a variable is simple type and has 64 bits, the debug info may look like the following when targeting 32bit windows. The variable's content is split into two 32bits registers. ``` 480 | S_LOCAL [size = 12] `x` type=0x0013 (__int64), flags = param 492 | S_DEFRANGE_SUBFIELD_REGISTER [size = 20] register = EAX, may have no name = true, offset in parent = 0 range = [0001:0073,+7), gaps = [] 512 | S_DEFRANGE_SUBFIELD_REGISTER [size = 20] register = ECX, may have no name = true, offset in parent = 4 range = [0001:0073,+7), gaps = [] ``` Reviewed By: labath Differential Revision: https://reviews.llvm.org/D122943
2022-04-14[LLDB][NativePDB] Fix inline line info in line tableZequan Wu
It fixes the following case: ``` 0602 line 1 (+1) 0315 code 0x15 (+0x15) 0B2B code 0x20 (+0xB) line 2 (+1) 0602 line 3 (+1) 0311 code 0x31 (+0x11) ... ``` Inline ranges should have following mapping: `[0x15, 0x20) -> line 1` `[0x20, 0x31) -> line 2` Inline line entries: `0x15, line 1`, `0x20, line 2`, `0x31, line 3`. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D123092
2022-04-01[LLDB][NativePDB] Create inline function declsZequan Wu
This creates inline functions decls in the TUs where the funcitons are inlined and local variable decls inside those functions. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D121967
2022-03-15[LLDB][NativePDB] Don't complete static members' types when completing a ↵Zequan Wu
record type. `UdtRecordCompleter` shouldn't complete static members' types. static members' types are going to be completed when the types are called in `SymbolFile::CompleteType`. Reviewed By: labath Differential Revision: https://reviews.llvm.org/D121030
2022-03-10[LLDB][NativePDB] Add support for S_DEFRANGE_REGISTER and ↵Zequan Wu
S_DEFRANGE_SUBFIELD_REGISTER Differential Revision: https://reviews.llvm.org/D119508
2022-01-13Revert "Revert "[LLDB][NativePDB] Add support for inlined functions""Zequan Wu
This reland 945aa520ef07a3edb655f3f38e4c3023658dd623 with fixes. This reverts commit 10bc3362a1a8a3df2660bf65db0ec1ccab646e1b.
2022-01-12Revert "[LLDB][NativePDB] Add support for inlined functions"Stella Stamenova
This reverts commit 945aa520ef07a3edb655f3f38e4c3023658dd623. This commit broke the windows lldb bot.
2022-01-11[LLDB][NativePDB] Add support for inlined functionsZequan Wu
This adds inline function support to NativePDB by parsing S_INLINESITE records to retrieve inlinee line info and add them into line table at `ParseLineTable`. Differential Revision: https://reviews.llvm.org/D116845
2020-08-11[LLDB] Improve PDB discoveryAdrian McCarthy
When loading a PE/COFF target, the associated PDB file often wasn't found. The executable module contains a path for the associated PDB file, but people often debug from a different directory than the one their build system uses. (This is especially common in post-mortem and cross platform debugging.) Suppose the COFF executable being debugged is `~/proj/foo.exe`, but it was built elsewhere and refers to `D:\remote\build\env\foobar.pdb`, LLDB wouldn't find it. With this change, if no file exists at the PDB path, LLDB will look in the executable directory for a PDB file that matches the name of the one it expected (e.g., `~/proj/foobar.pdb`). If found, the PDB is subject to the same matching criteria (GUIDs and age) as would have been used had it been in the original location. This same-directory-as-the-binary rule is commonly used by debuggers on Windows. Differential Review: https://reviews.llvm.org/D84815
2020-05-11[LLDB] Fix broken testsuite due to Xfail decoratorsMuhammad Omair Javaid
Following test cases need minor adjustment in order to accomodate xfail decorator: lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp
2019-10-09Re-land "[test] Split LLDB tests into API, Shell & Unit"Jonas Devlieghere
The original patch got reverted because it broke `check-lldb` on a clean build. This fixes that. llvm-svn: 374201
2019-10-09Revert [test] Split LLDB tests into API, Shell & UnitAdrian Prantl
as it appears to have broken check-lldb. This reverts r374184 (git commit 22314179f0660c172514b397060fd8f34b586e82) llvm-svn: 374187
2019-10-09[test] Split LLDB tests into API, Shell & UnitJonas Devlieghere
LLDB has three major testing strategies: unit tests, tests that exercise the SB API though dotest.py and what we currently call lit tests. The later is rather confusing as we're now using lit as the driver for all three types of tests. As most of this grew organically, the directory structure in the LLDB repository doesn't really make this clear. The 'lit' tests are part of the root and among these tests there's a Unit and Suite folder for the unit and dotest-tests. This layout makes it impossible to run just the lit tests. This patch changes the directory layout to match the 3 testing strategies, each with their own directory and their own configuration file. This means there are now 3 directories under lit with 3 corresponding targets: - API (check-lldb-api): Test exercising the SB API. - Shell (check-lldb-shell): Test exercising command line utilities. - Unit (check-lldb-unit): Unit tests. Finally, there's still the `check-lldb` target that runs all three test suites. Finally, this also renames the lit folder to `test` to match the LLVM repository layout. Differential revision: https://reviews.llvm.org/D68606 llvm-svn: 374184