This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Add location_t printer to gdbinit.in
- From: Marek Polacek <polacek at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 31 Jan 2014 11:40:38 +0100
- Subject: [PATCH] Add location_t printer to gdbinit.in
- Authentication-results: sourceware.org; auth=none
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