About GDB user-defined commands ?
Benoit MILLOT
benoit.millot@cstelecom.com
Tue Aug 22 04:17:00 GMT 2000
"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
More information about the Gdb
mailing list