Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* new pdie utility macro
@ 2008-10-04 21:03 Doug Evans
  2008-10-05 16:05 ` Daniel Jacobowitz
  2008-10-05 16:08 ` Daniel Jacobowitz
  0 siblings, 2 replies; 4+ messages in thread
From: Doug Evans @ 2008-10-04 21:03 UTC (permalink / raw)
  To: gdb-patches

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  <dje@google.com>

	* 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: new pdie utility macro
  2008-10-04 21:03 new pdie utility macro Doug Evans
@ 2008-10-05 16:05 ` Daniel Jacobowitz
  2008-10-05 16:08 ` Daniel Jacobowitz
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-10-05 16:05 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

On Sat, Oct 04, 2008 at 02:02:46PM -0700, Doug Evans wrote:
> 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  <dje@google.com>
> 
> 	* gdbinit.in (pdie): New macro.

OK.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: new pdie utility macro
  2008-10-04 21:03 new pdie utility macro Doug Evans
  2008-10-05 16:05 ` Daniel Jacobowitz
@ 2008-10-05 16:08 ` Daniel Jacobowitz
  2008-10-05 19:19   ` Doug Evans
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2008-10-05 16:08 UTC (permalink / raw)
  To: Doug Evans; +Cc: gdb-patches

On Sat, Oct 04, 2008 at 02:02:46PM -0700, Doug Evans wrote:
> 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 ...]

Actually, why this choice?

> +  if $argc == 1
> +    call dump_die ($arg0, 10)

I'd have guessed this as 0 instead of 10.  If I say "pdie die"
shouldn't it print the DIE, not its children?

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: new pdie utility macro
  2008-10-05 16:08 ` Daniel Jacobowitz
@ 2008-10-05 19:19   ` Doug Evans
  0 siblings, 0 replies; 4+ messages in thread
From: Doug Evans @ 2008-10-05 19:19 UTC (permalink / raw)
  To: gdb-patches

On Sun, Oct 5, 2008 at 9:07 AM, Daniel Jacobowitz <drow@false.org> wrote:
> On Sat, Oct 04, 2008 at 02:02:46PM -0700, Doug Evans wrote:
>> 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 ...]
>
> Actually, why this choice?
>
>> +  if $argc == 1
>> +    call dump_die ($arg0, 10)
>
> I'd have guessed this as 0 instead of 10.  If I say "pdie die"
> shouldn't it print the DIE, not its children?

I picked a default value that was working for me.
I'll check it in as just printing the die without children,


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-05 19:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-04 21:03 new pdie utility macro Doug Evans
2008-10-05 16:05 ` Daniel Jacobowitz
2008-10-05 16:08 ` Daniel Jacobowitz
2008-10-05 19:19   ` Doug Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox