bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

not able to execute two commands at a same time....


From: rohan patil
Subject: not able to execute two commands at a same time....
Date: Fri, 20 Jan 2012 14:55:51 +0530

Hi,
       I tried to use user-defined commands in gdb, Below is the code snippet

saved in gdb.txt file...

define gpr
p $arg0
p $arg1
set $i = $arg0
set $j = $arg1
while $i <= $j
info reg r(p $i)
set $i++
end 
end
document gpr
Displays GPR contents from start index to destination index.
end 

in gdb shell following command i executed...
(gdb)source gdb.txt
(gdb)gpr 4 8
here i got invalid register....

         What i want is ($i) should be replaced with the number. for example it gdb should execute it as
(gdb)info reg r4
r0 
(gdb)info reg r5
(gdb)info reg r6
(gdb)info reg r8
(gdb)info reg r8
--
-- With Regards
Rohan Patil  
Saankhya Labs Pvt Ltd.
Mob: +91-9449989991


reply via email to

[Prev in Thread] Current Thread [Next in Thread]