From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15151 invoked by alias); 4 Oct 2008 21:03:41 -0000 Received: (qmail 15143 invoked by uid 22791); 4 Oct 2008 21:03:41 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out3.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 04 Oct 2008 21:02:55 +0000 Received: from spaceape11.eur.corp.google.com (spaceape11.eur.corp.google.com [172.28.16.145]) by smtp-out.google.com with ESMTP id m94L2l7S031764 for ; Sat, 4 Oct 2008 22:02:47 +0100 Received: from localhost (ruffy.corp.google.com [172.18.118.116]) by spaceape11.eur.corp.google.com with ESMTP id m94L2kii025621 for ; Sat, 4 Oct 2008 14:02:47 -0700 Received: by localhost (Postfix, from userid 67641) id 50FE91C78FA; Sat, 4 Oct 2008 14:02:46 -0700 (PDT) To: gdb-patches@sourceware.org Subject: new pdie utility macro Message-Id: <20081004210246.50FE91C78FA@localhost> Date: Sat, 04 Oct 2008 21:03:00 -0000 From: dje@google.com (Doug Evans) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00114.txt.bz2 Hi. This is an addendum to http://sourceware.org/ml/gdb-patches/2008-09/msg00561.html Ok to check in? [assuming the other patch is. btw, ping ...] 2008-10-04 Doug Evans * gdbinit.in (pdie): New macro. Index: gdbinit.in =================================================================== RCS file: /cvs/src/src/gdb/gdbinit.in,v retrieving revision 1.3 diff -u -p -u -p -r1.3 gdbinit.in --- gdbinit.in 20 Jan 2004 09:29:16 -0000 1.3 +++ gdbinit.in 4 Oct 2008 20:55:12 -0000 @@ -15,3 +15,20 @@ dir @srcdir@/../bfd dir @srcdir@ dir . set prompt (top-gdb) + +define pdie + if $argc == 1 + call dump_die ($arg0, 10) + else + if $argc == 2 + call dump_die ($arg0, $arg1) + else + printf "Syntax: pdie die [depth]\n" + end + end +end + +document pdie +Pretty print a DWARF DIE. +Syntax: pdie die [depth] +end