small changes of gdbinit.in

2008-01-22 Thread Eric Fisher
I guess that the argument of the user defined command in gdbinit.in should be $arg0. Also, due to the changes of the structure tree node, ptc should be, define ptc -output (enum tree_code) $.common.code +output (enum tree_code) $arg0.base.code echo \n end Here's the patch, --- gcc/gdbinit.in

Re: small changes of gdbinit.in

2008-01-23 Thread Daniel Jacobowitz
On Wed, Jan 23, 2008 at 02:31:11PM +0800, Eric Fisher wrote: > I guess that the argument of the user defined command in gdbinit.in > should be $arg0. Also, due to the changes of the structure tree node, > ptc should be, No, the use of $ is deliberate. Print the value you want, then type ptc by it

Re: small changes of gdbinit.in

2008-01-25 Thread Daniel Jacobowitz
On Fri, Jan 25, 2008 at 10:54:18AM -0700, Tom Tromey wrote: > > "Joe" == Joe Buck <[EMAIL PROTECTED]> writes: > > Joe> When was $arg0 added to gdb? And why would a gcc developer need > Joe> to use an old gdb? > > $arg0 is ancient, but $argc is pretty new. It was added in GDB 6.4, released J

Re: small changes of gdbinit.in

2008-01-25 Thread David Daney
Joe Buck wrote: On Fri, Jan 25, 2008 at 10:18:01AM -0700, Tom Tromey wrote: "Joe" == Joe Buck <[EMAIL PROTECTED]> writes: Joe> On the other hand, old-timers are used to the commands being the way Joe> they are. So I guess that a command that takes a proper argument Joe> should have a different

Re: small changes of gdbinit.in

2008-01-25 Thread Joe Buck
On Wed, Jan 23, 2008 at 08:03:05AM -0500, Daniel Jacobowitz wrote: > On Wed, Jan 23, 2008 at 02:31:11PM +0800, Eric Fisher wrote: > > I guess that the argument of the user defined command in gdbinit.in > > should be $arg0. Also, due to the changes of the structure tree node, > > ptc should be, > >

Re: small changes of gdbinit.in

2008-01-25 Thread Tom Tromey
> "Joe" == Joe Buck <[EMAIL PROTECTED]> writes: Joe> When was $arg0 added to gdb? And why would a gcc developer need Joe> to use an old gdb? $arg0 is ancient, but $argc is pretty new. Tom

Re: small changes of gdbinit.in

2008-01-25 Thread Joe Buck
On Fri, Jan 25, 2008 at 10:18:01AM -0700, Tom Tromey wrote: > > "Joe" == Joe Buck <[EMAIL PROTECTED]> writes: > > Joe> On the other hand, old-timers are used to the commands being the way > Joe> they are. So I guess that a command that takes a proper argument > Joe> should have a different na

Re: small changes of gdbinit.in

2008-01-25 Thread Tom Tromey
> "Joe" == Joe Buck <[EMAIL PROTECTED]> writes: Joe> On the other hand, old-timers are used to the commands being the way Joe> they are. So I guess that a command that takes a proper argument Joe> should have a different name. You can have it both ways, somewhat: define pt if $argc == 0

Re: small changes of gdbinit.in

2008-01-25 Thread Joe Buck
On Fri, Jan 25, 2008 at 10:23:03AM -0800, David Daney wrote: > Joe Buck wrote: > >On Fri, Jan 25, 2008 at 10:18:01AM -0700, Tom Tromey wrote: > >>>"Joe" == Joe Buck <[EMAIL PROTECTED]> writes: > >>Joe> On the other hand, old-timers are used to the commands being the way > >>Joe> they are. So I