Commit 01fdfa4
Automerge: [LLDB][NativePDB] Use original struct name when searching for constants (#166845)
We used to search for constants using the name we parsed. For C++, this
would mean using the demangled struct name (from the unique name). This
name is not always equal to the one used for the struct's name by the
compiler. For example:
```
0x105E | LF_STRUCTURE [size = 120, hash = 0xF38F] ``anonymous namespace'::Anonymous<A::B::C<void> >::D`
unique name: `.?AUD@?$Anonymous@U?$C@X@B@A@@@?A0x8C295248@@`
```
We would use the unique name and get to `(anonymous
namespace)::Anonymous<struct A::B::C<void>>::D`. Then, when finding the
constant in the field list, we'd search for `(anonymous
namespace)::Anonymous<struct A::B::C<void>>::D::StaticMember`. This
wouldn't yield any results, because the constant will use the demangled
name as given by the compiler.
With this PR, we use the struct's name as given in the PDB and append
the member name.File tree
4 files changed
+36
-28
lines changed- lldb
- source/Plugins/SymbolFile/NativePDB
- test/Shell/SymbolFile/NativePDB
- Inputs
4 files changed
+36
-28
lines changedLines changed: 14 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 48 | + | |
| 49 | + | |
52 | 50 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 51 | + | |
| 52 | + | |
57 | 53 | | |
58 | 54 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
64 | 58 | | |
65 | 59 | | |
66 | | - | |
67 | | - | |
68 | 60 | | |
69 | 61 | | |
70 | 62 | | |
| |||
168 | 160 | | |
169 | 161 | | |
170 | 162 | | |
171 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
172 | 168 | | |
173 | 169 | | |
174 | 170 | | |
| |||
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 45 | + | |
51 | 46 | | |
52 | 47 | | |
53 | 48 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | 69 | | |
| |||
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| 94 | + | |
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
| |||
131 | 138 | | |
132 | 139 | | |
133 | 140 | | |
| 141 | + | |
134 | 142 | | |
135 | 143 | | |
136 | 144 | | |
| |||
176 | 184 | | |
177 | 185 | | |
178 | 186 | | |
179 | | - | |
180 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
181 | 196 | | |
182 | 197 | | |
183 | 198 | | |
184 | 199 | | |
185 | 200 | | |
| 201 | + | |
186 | 202 | | |
187 | | - | |
| 203 | + | |
188 | 204 | | |
0 commit comments