-------- Forwarded Message -------- Subject: [patch] implement generic debug() for vectors and hash sets Date: Mon, 16 Oct 2017 09:52:51 -0400 From: Aldy Hernandez To: gcc-patches We have a generic mechanism for dumping types from the debugger with: (gdb) call debug(some_type) However, even though most types are implemented, we have no canonical way of dumping vectors or hash sets. The attached patch fixes this oversight. With it you can call debug(vec<>) and debug(hash_set<>) with the following types: rtx, tree, basic_block, edge, rtx_insn. More can be added simply by adding a debug_slim(your_type) overload and calling: DEFINE_DEBUG_VEC (your_type) DEFINE_DEBUG_HASH_SET (your_type) Here is an example of how things look with this patch: vec of edges: [0] = 10)> vec of bbs: [0] = [1] = vec of trees: [0] = [1] = [2] = vec of rtx: [0] = (reg:SI 87) [1] = (reg:SI 87) hash of bbs: OK for mainline?