I know that printing the unordered_map variable can output all elements, but currently I have a scenario where the unordered_map contains millions of elements and I only care about the value corresponding to a specific key. How can I print it in gdb? I tried using operator[]
and at
but neither works.
In addition, I have already included -g
, -O0
, and -fno-inline
when compiling.