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
_______________________________________________ bug-gdb mailing list bug-gdb@gnu.org https://lists.gnu.org/mailman/listinfo/bug-gdb