This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: About GDB user-defined commands ?
- To: "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>, "gdb at sourceware dot cygnus dot com" <gdb at sourceware dot cygnus dot com>
- Subject: Re: About GDB user-defined commands ?
- From: "Benoit MILLOT" <benoit dot millot at cstelecom dot com>
- Date: Tue, 22 Aug 2000 13:21:22 +0200
- Organization: CS Telecom
- References: <200008211711.TAA15504@reisser.regent.e-technik.tu-muenchen.de>
"Peter.Schauer" wrote:
> Try:
>
> define dm
> set var $taddr =3D $arg0
> set var $tsize =3D $arg1
> while $tsize !=3D 0
> if $tsize >=3D 10
> monitor dm $taddr $tsize
> set var $taddr =3D $taddr + 10
> set var $tsize =3D $tsize - 10
> else
> monitor dm $taddr $tsize
> set var $tsize =3D 0
> end
> end
> end
>
> > Hello,
> >
> > I want to develop a user-defined command for my own monitor
> > which i have already implemented into gdb with nomitor ops..
> >
> > Can i use a new variable? (answear seems to be NO)
> > Can i make operation (addition, ...) with input argument (arg0 ...)?
> >
> > Any ides will be appreciated.
> > Thanks.
> >
> --
> Peter Schauer pes@regent.e-technik.tu-muenchen.de
Thanks,
I have one problem more:
With this, on the serial line there is : dm $taddr $tsize instead=
of dm 407000 50
Monitor command pass arguments like string without interpretation ?
I want value on serial line.
But the command "monitor dm $arg0 $arg1" in a user-defined command works
fine,
on the serial line (dm 407000 50).
So what is the syntax for pass value instead of string with variable?
Thanks a lot.
Beno=EE=
t