Commit aec0da1
[utils] Fix DenseMap debugger printers for the packed used-bit array (#201755)
DenseMap no longer use in-band sentinel keys. (#200595 and #201281).
Update the GDB pretty printer and LLDB data formatters to test the used
bit rather than comparing keys.
GDB: advancePastEmptyBuckets relied on DenseMapInfo::getEmptyKey(),
which could not be evaluated in GDB and so was disabled, leaving the printer
to emit empty and erased buckets. It now walks bucket indices and skips any
whose used bit is clear.
LLDB: DenseMapSynthetic used a key-uniqueness heuristic to guess which
buckets were live, which mishandled a lone erased bucket (hence the
former tombstones=1 summary note). It now reads the used array directly,
so erased entries are skipped exactly. NumTombstones no longer exists,
so drop it from the summary.
Written by Claude Opus 4.8
---------
Co-authored-by: Dave Lee <[email protected]>1 parent a172bbc commit aec0da1
2 files changed
Lines changed: 30 additions & 62 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
159 | 166 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
| 167 | + | |
| 168 | + | |
179 | 169 | | |
180 | 170 | | |
181 | | - | |
| 171 | + | |
182 | 172 | | |
183 | | - | |
184 | | - | |
| 173 | + | |
| 174 | + | |
185 | 175 | | |
186 | | - | |
| 176 | + | |
187 | 177 | | |
188 | 178 | | |
189 | 179 | | |
| |||
198 | 188 | | |
199 | 189 | | |
200 | 190 | | |
201 | | - | |
202 | | - | |
203 | | - | |
| 191 | + | |
| 192 | + | |
204 | 193 | | |
205 | 194 | | |
206 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
448 | 447 | | |
449 | 448 | | |
450 | 449 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
| 450 | + | |
459 | 451 | | |
460 | 452 | | |
461 | 453 | | |
| |||
492 | 484 | | |
493 | 485 | | |
494 | 486 | | |
495 | | - | |
496 | 487 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
509 | 496 | | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
| 497 | + | |
| 498 | + | |
520 | 499 | | |
521 | 500 | | |
522 | 501 | | |
| |||
0 commit comments