Minor oversight... debug_vec_tree() no longer exist. I forgot to remove the prototype. Also, gdbinit.in has a macro that uses it, but this is no longer necessary as we can print tree vectors generically with "print debug(xxx)". Applied as obvious. Aldy On Sun, Nov 19, 2017 at 5:45 PM, Jeff Law wrote: > On 10/23/2017 03:44 AM, Aldy Hernandez wrote: >> >> >> >> -------- 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? >> >> >> curr.patch >> >> >> gcc/ >> >> * vec.h (debug_helper): New function. >> (DEFINE_DEBUG_VEC): New macro. >> * hash-set.h (debug_helper): New function. >> (DEFINE_DEBUG_HASH_SET): New macro. >> * cfg.c (debug_slim (edge)): New function. >> Call DEFINE_DEBUG_VEC for edges. >> Call DEFINE_DEBUG_HASH_SET for edges. >> * cfghooks.c (debug_slim (basic_block)): New function. >> Call DEFINE_DEBUG_VEC for basic blocks. >> Call DEFINE_DEBUG_HASH_SET for basic blocks. >> * print-tree.c (debug_slim): New function to handle trees. >> Call DEFINE_DEBUG_VEC for trees. >> Call DEFINE_DEBUG_HASH_SET for trees. >> (debug (vec) &): Remove. >> (debug () *): Remove. >> * print-rtl.c (debug_slim): New function to handle const_rtx. >> Call DEFINE_DEBUG_VEC for rtx_def. >> Call DEFINE_DEBUG_VEC for rtx_insn. >> Call DEFINE_DEBUG_HASH_SET for rtx_def. >> Call DEFINE_DEBUG_HASH_SET for rtx_insn. >> * sel-sched-dump.c (debug (vec &): Remove. >> (debug (vec *ptr): Remove. >> (debug_insn_vector): Remove. >> * stor-layout.c (debug_rli): Call debug() instead of debug_vec_tree. > OK. > jeff