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
> "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
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
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
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
> "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
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,
>
>
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
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