This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

About GDB user-defined commands ?


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 ...)?

example:
user defined command dm :

dm $arg0 $arg1

while $arg0!=3D0
   if $arg1>=3D10
     monitor dm $arg0 $arg1
     $arg1 =3D $arg1 -10
     $arg0 =3D $arg0 +10
   else
      monitor dm $arg0 $arg1
   end

I try this but it doesn't work and lines with $xxx =3D $ xxx +  xxx
disappear after the first exec.
message : No symbol in cuurent context

With line:     SET $arg0 =3D $arg0 +10
                   Left operand of assignement is not a Lvalue

Any ides will be appreciated.
Thanks.

                                            Beno=EEt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]