0

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.enter image description here

In addition, I have already included -g, -O0, and -fno-inline when compiling.

DickHunter
  • 166
  • 6
  • Could you share your compilation flags? Try compiling the program with `-O0` and `-ggdb3` if you haven't done so already. – cigien May 05 '23 at 10:43
  • 1
    Do you have [xmethods](https://stackoverflow.com/a/73673643/1983398) enabled? – ssbssa May 05 '23 at 11:12

0 Answers0