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, > > No, the use of $ is deliberate. Print the value you want, then type > ptc by itself. Whether this is the best way or not is up for > discussion, but it's done on purpose :-)
This gdb command definition is ancient, and I think it precedes the availability of the $arg0 feature. Before gdb macros had arguments, this is how you had to do it. On the other hand, old-timers are used to the commands being the way they are. So I guess that a command that takes a proper argument should have a different name.