aboutsummaryrefslogtreecommitdiff
path: root/gdbsupport/string-set.h
AgeCommit message (Collapse)AuthorFilesLines
2026-01-05Update copyright dates to include 2026Tom Tromey1-1/+1
This updates the copyright headers to include 2026. I did this by running gdb/copyright.py and then manually modifying a few files as noted by the script.
2025-03-12Use correct types in string-set.hTom Tromey1-2/+2
My earlier patch to introduce string-set.h used the wrong type in the hash functions. This patch fixes the error.
2025-03-10Add string cache and use it in cooked indexTom Tromey1-0/+129
The cooked index needs to allocate names in some cases -- when canonicalizing or when synthesizing Ada package names. This process currently uses a vector of unique_ptrs to manage the memory. Another series I'm writing adds another spot where this allocation must be done, and examining the result showed that certain names were allocated multiple times. To clean this up, this patch introduces a string cache object and changes the cooked indexer to use it. I considered using bcache here, but bcache doesn't work as nicely with string_view -- because bcache is fundamentally memory-based, a temporary copy of the contents must be made to ensure that bcache can see the trailing \0. Furthermore, writing a custom class lets us avoid another copy when canonicalizing C++ names. Approved-By: Simon Marchi <simon.marchi@efficios.com>