From 5e49f23ecedcc5278f14278a6bccd6d003b5cc60 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Wed, 29 May 2019 11:45:07 +0200 Subject: [PATCH] gdbinit: add a new command and fix one gcc/ChangeLog: 2019-05-29 Martin Liska * gdbinit.in: Fix 'ptc' command. Add trt that prints TREE_TYPE($). --- gcc/gdbinit.in | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in index e16c3c8ef87..440fd2586f1 100644 --- a/gcc/gdbinit.in +++ b/gcc/gdbinit.in @@ -113,7 +113,7 @@ Works only when an inferior is executing. end define ptc -output (enum tree_code) $.common.code +output (enum tree_code) $.base.code echo \n end @@ -201,6 +201,14 @@ document pcfun Print current function. end +define trt +print ($.typed.type) +end + +document trt +Print TREE_TYPE of the tree node that is $ +end + define break-on-diagnostic break diagnostic_show_locus end -- 2.21.0