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  <pola...@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

Reply via email to