Skip to content

Instantly share code, notes, and snippets.

@k3DW
Last active August 14, 2024 00:16
Show Gist options
  • Save k3DW/ead86d748aa4c4bba3f9f67f09521ba5 to your computer and use it in GitHub Desktop.
Save k3DW/ead86d748aa4c4bba3f9f67f09521ba5 to your computer and use it in GitHub Desktop.
GDB Printout
#### Container printout ####
(gdb) print example_map
$1 = boost::unordered::unordered_map with 5 elements = {["6"] = 33, ["0"] = 0, ["2"] = 11, ["8"] = 44, ["4"] = 22}
(gdb) print example_set
$2 = boost::unordered::unordered_set with 5 elements = {[0] = "6", [1] = "0", [2] = "2", [3] = "8", [4] = "4"}
#### Iterator printout ####
(gdb) print example_map_begin
$1 = iterator = { {first = "6", second = 33} }
(gdb) print example_map_end
$2 = iterator = { end iterator }
(gdb) print example_set_begin
$3 = iterator = { "6" }
(gdb) print example_set_end
$4 = iterator = { end iterator }
#### Stats printout ####
(gdb) print_stats cfoa_flat_map
$1 = boost::unordered::concurrent_flat_map with 5 elements [stats] = {[insertion] = {[count] = 5, [probe_length] = {avg = 1.0, var = 0.0, dev = 0.0}}, [successful_lookup] = {[count] = 0, [probe_length] = {avg = 0.0, var = 0.0, dev = 0.0}, [num_comparisons] = {avg = 0.0, var = 0.0, dev = 0.0}}, [unsuccessful_lookup] = {[count] = 6, [probe_length] = {avg = 1.0, var = 0.0, dev = 0.0}, [num_comparisons] = {avg = 0.0, var = 0.0, dev = 0.0}}}
#### Stats printout with custom options ####
(gdb) print_stats -p -- cfoa_flat_map
$2 = boost::unordered::concurrent_flat_map with 5 elements [stats] = {
[insertion] = {
[count] = 5,
[probe_length] = {avg = 1.0, var = 0.0, dev = 0.0}
},
[successful_lookup] = {
[count] = 0,
[probe_length] = {avg = 0.0, var = 0.0, dev = 0.0},
[num_comparisons] = {avg = 0.0, var = 0.0, dev = 0.0}
},
[unsuccessful_lookup] = {
[count] = 6,
[probe_length] = {avg = 1.0, var = 0.0, dev = 0.0},
[num_comparisons] = {avg = 0.0, var = 0.0, dev = 0.0}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment