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]

[PATCH] Add location_t printer to gdbinit.in


Often enough I need to print expanded_location of location_t.
It'd be convenient to have this macro in gdbinit.in.

Ok?

2014-01-31  Marek Polacek  <polacek@redhat.com>

	* gdbinit.in (pel): Define.

diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in
index c388f8a..25c530a 100644
--- a/gcc/gdbinit.in
+++ b/gcc/gdbinit.in
@@ -190,6 +190,15 @@ document pbm
 Dump the bitmap that is in $ as a comma-separated list of numbers.
 end
 
+define pel
+output expand_location ($)
+echo \n
+end
+
+document pel
+Print expanded location of $.
+end
+
 # Define some macros helpful to gdb when it is expanding macros.
 macro define __FILE__ "gdb"
 macro define __LINE__ 1

	Marek


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