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 <l...@redhat.com> 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 <al...@redhat.com> >> To: gcc-patches <gcc-patches@gcc.gnu.org> >> >> 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] = <edge 0x0x7f3f81c0d700 (6 -> 10)> >> >> vec of bbs: >> [0] = <basic_block 0x7f3f81ac9410 (6)> >> [1] = <basic_block 0x7f3f81ac96e8 (10)> >> >> vec of trees: >> [0] = <integer_type 0x7f3f81ad55e8 int> >> [1] = <integer_type 0x7f3f81ad5498 short int> >> [2] = <integer_cst 0x7f3f81ada078 0> >> >> vec of rtx: >> [0] = (reg:SI 87) >> [1] = (reg:SI 87) >> >> hash of bbs: >> <basic_block 0x7f3f81ac96e8 (10)> >> <basic_block 0x7f3f81ac9410 (6)> >> >> 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<tree, va_gc>) &): Remove. >> (debug (<vec<tree, va_gc>) *): 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<rtx_insn *> &): Remove. >> (debug (vec<rtx_insn *> *ptr): Remove. >> (debug_insn_vector): Remove. >> * stor-layout.c (debug_rli): Call debug() instead of debug_vec_tree. > OK. > jeff
gcc/ * print-tree.h (debug_vec_tree): Remove prototype. * gdbinit.in (pvt): Remove macro. diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in index ebdeaf0f2c9..9e9485b0adf 100644 --- a/gcc/gdbinit.in +++ b/gcc/gdbinit.in @@ -130,14 +130,6 @@ document ptn Print the name of the type-node that is $. end -define pvt -set debug_vec_tree ($) -end - -document pvt -Print the VEC(tree) that is in $. -end - define pdd set debug_dwarf_die ($) end diff --git a/gcc/print-tree.h b/gcc/print-tree.h index 29efc071c53..1707665939a 100644 --- a/gcc/print-tree.h +++ b/gcc/print-tree.h @@ -31,7 +31,6 @@ extern void debug_head (const tree_node &ref); extern void debug_head (const tree_node *ptr); extern void debug_body (const tree_node &ref); extern void debug_body (const tree_node *ptr); -extern void debug_vec_tree (vec<tree, va_gc> *); extern void debug (vec<tree, va_gc> &ref); extern void debug (vec<tree, va_gc> *ptr); extern void debug_raw (vec<tree, va_gc> &ref);