Landing: b80a4347fc63
Project / Subsystem
gcc / libstdc++
Date
2026-07-27
Author
David Faure
Commit
b80a4347fc63b1a6ed6e2b3ea26c5948f08ba3cd
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- libstdc++
- patch_id
- —
- commit_hash
- b80a4347fc63b1a6ed6e2b3ea26c5948f08ba3cd
- source_type
- github
- headline
- libstdc++: Fix num_children for map/set pretty-printers
- tldr
- Corrects the `num_children` method in GDB pretty-printers for std::map and std::unordered_map to accurately reflect GDB's child count.
- author
- David Faure
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • libstdc++
- • gdb
- • pretty-printer
- • debug
- • container
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-27T00:00:00.000Z
This commit fixes a discrepancy in GDB’s pretty-printers for std::map and std::unordered_map in libstdc++. The num_children methods were incorrectly reporting half the number of children that GDB’s children() function provided. This caused issues for debuggers and clients (like KDevelop) that rely on these methods, leading to an inaccurate display of map and unordered map contents. The fix ensures num_children returns twice the number of elements, matching the children() output.