This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
MI usage inside a user-defined commands
- From: Karganov Konstantin <kostik at ispras dot ru>
- To: gdb at sources dot redhat dot com
- Date: Wed, 6 Jul 2005 16:16:52 +0400 (MSD)
- Subject: 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.