This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
MI: is target running
- From: Vladimir Prus <ghost at cs dot msu dot su>
- To: gdb at sources dot redhat dot com
- Date: Fri, 18 Nov 2005 15:39:41 +0300
- Subject: MI: is target running
Hi,
I have a simple question -- how a GUI frontend can determine if gdb is
running the target at the moment? It's obviously necessary to disable some
actions, enable some other actions and so on.
Say, I'm using MI. However, user might have a lot of gdb macros he wants to
still use, and those macros can contain "run", or "continue" commands --
why not.
Here's what I've tried:
ghost@zigzag:/tmp$ cat a.gdb
define myrun
run
end
ghost@zigzag:/tmp$ gdb --i=mi a.out
~"GNU gdb 6.3-debian\n"
(gdb)
source a.gdb
&"source a.gdb\n"
^done
(gdb)
interpreter console "myrun"
&"interpreter console \"myrun\"\n"
Hi
Program exited normally.
^done
(gdb)
So, for "run" command embedded in gdb macro invoked via "interpreter
console", there's no "^running" in the output. So, GUI can't detect that
the target is running.
Is this a defect? Should not "^running" be emitted in all cases when target
starts running?
- Volodya