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]
Other format: [Raw text]

MI usage inside a user-defined commands


Hello, all.

It seems that user-defined commands are always parsed by console cmd-line 
interpreter (no matter what interpreter was specified).
I tried to print a variable from the user-defined cmd and directly from 
the interpreter:

(gdb)
define aaaa
&"define aaaa\n"
>-data-evaluate-expression i
>end
^done
(gdb)
aaaa
&"aaaa\n"
&"Undefined command: \"-data-evaluate-expression\".  Try \"help\".\n"
^error,msg="Undefined command: \"-data-evaluate-expression\".  Try 
\"help\"."
(gdb)
-data-evaluate-expression i
^done,value="0"
(gdb)

I use gdb 6.3 built from sources on RedHat 9. Debug session is started as 
"gdb --i=mi a.out"

Is is a bug or a feature?

Best regards,
Konstantin.



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