This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: PATCH to add pp command to gdbinit.in


Since pvt was removed, it's bugged me that to pretty-print a vec I
needed to write out "call debug($)".  So this patch adds a generic
command "pp" to print anything handled by a debug overload.

OK for trunk?
commit 2dd2501e3abbd9d0b70119534fa5a93e957432bf
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Nov 20 01:18:00 2018 -0500

            * gdbinit.in (pp): New macro.
    
            (pbb): Fix.

diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in
index 4db977f0bab..e7d34686864 100644
--- a/gcc/gdbinit.in
+++ b/gcc/gdbinit.in
@@ -16,6 +16,15 @@
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
+define pp
+call debug ($)
+end
+
+document pp
+Print a representation of the GCC data structure that is $.
+Works only when an inferior is executing.
+end
+
 define pr
 set debug_rtx ($)
 end
@@ -167,7 +176,7 @@ including the global binding level.
 end
 
 define pbb
-set debug ($)
+call debug ($)
 end
 
 document pbb

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]