* Re: Query regarding GDB-Mi interface
[not found] ` <488FF89A.3020609@mentor.com>
@ 2008-08-01 23:34 ` Nick Roberts
0 siblings, 0 replies; 3+ messages in thread
From: Nick Roberts @ 2008-08-01 23:34 UTC (permalink / raw)
To: Pankaj Pal; +Cc: gdb
> We have a debugging front end which uses gdb-6.6 We were using
> annotations till now but
> as annotations have been made obsolete we are shifting to MI
> interpreter. I have a few queries regarding MI.
>
> 1) Why few commands are still un implemented like attach, info program
> etc. Is there any plan to support them.
I think the plan is only to implement commands as they are needed. Probably
many of the commands listed in the MI section don't need to be implemented.
> 2) Is there any way to stop the MI interpreter like we have with
> annotations (set annotate 0 whenever we wish to do so).
No. Annotations just markup the output and are easy to turn off. MI uses
a different interpreter, which is a more fundamental change and allows
a different set of input commands.
Apple GDB, however, does allow switching of interpreters, e.g MI to CLI
(normal output) and it may be useful for FSF GDB to do this too.
> 3) We need 'info line *addr' command when we are shifting to MI from
> annotations. I have been doing few changes in
> the gdb source code to get this information (source file and line
> number), however annotations have this information.
> I would like to know is there any known issue due to which this
> command has not been implemented.
MI will accept CLI commands but you need to parse the output, e.g.,
info line
&"info line\n"
~"Line 146 of \"myprog.c\" starts at address 0x80486e9 <main>\n"
~" and ends at 0x8048706 <main+29>.\n"
^done
(gdb)
However, it doen't print the annotation that "info line" generates with
annotations if you need that.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 3+ messages in thread
* Query regarding GDB-Mi interface
@ 2008-07-30 6:53 Pankaj Pal
2008-07-30 7:07 ` Vladimir Prus
0 siblings, 1 reply; 3+ messages in thread
From: Pankaj Pal @ 2008-07-30 6:53 UTC (permalink / raw)
To: gdb
We have a debugging front end which uses gdb-6.6 We were using
annotations till now but
as annotations have been made obsolete we are shifting to MI
interpreter. I have a few queries regarding MI.
1) Why few commands are still un implemented like attach, info program
etc. Is there any plan to support them.
2) Is there any way to stop the MI interpreter like we have with
annotations (set annotate 0 whenever we wish to do so).
3) We need 'info line *addr' command when we are shifting to MI from
annotations. I have been doing few changes in
the gdb source code to get this information (source file and line
number), however annotations have this information.
I would like to know is there any known issue due to which this
command has not been implemented.
4) In the gdb manual I can see that 'call' command in gdb is equivalent
to '-data-evaluate-expression' in MI. But with
annotations, the 'call' command sequence is as follows ::
^z^z starting
--->> do the call command functionality
^z^z stopped
However, with MI, we are not getting the 'running' and 'stopped' tokens.
--
Thanks & Regards,
Pankaj Pal
Extn. 4529
Mentor Graphics, Noida
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Query regarding GDB-Mi interface
2008-07-30 6:53 Pankaj Pal
@ 2008-07-30 7:07 ` Vladimir Prus
0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Prus @ 2008-07-30 7:07 UTC (permalink / raw)
To: gdb
Pankaj Pal wrote:
> We have a debugging front end which uses gdb-6.6 We were using
> annotations till now but
> as annotations have been made obsolete we are shifting to MI
> interpreter. I have a few queries regarding MI.
>
> 1) Why few commands are still un implemented like attach,
Because you are using gdb-6.6. The -target-attach command is implemented
in CVS HEAD.
> info program
> etc. Is there any plan to support them.
I don't have any plan to implement MI version of "info program", in part
because I never heard about this command. Why do you need it?
> 2) Is there any way to stop the MI interpreter like we have with
> annotations (set annotate 0 whenever we wish to do so).
What do you mean "stop"? GDB will always accept MI commands, and output
MI outputs if you've started it in MI mode.
> 3) We need 'info line *addr' command when we are shifting to MI from
> annotations. I have been doing few changes in
> the gdb source code to get this information (source file and line
> number), however annotations have this information.
> I would like to know is there any known issue due to which this
> command has not been implemented.
You can use "info line *addr" just fine, even in MI mode.
> 4) In the gdb manual I can see that 'call' command in gdb is equivalent
> to '-data-evaluate-expression' in MI. But with
> annotations, the 'call' command sequence is as follows ::
> ^z^z starting
> --->> do the call command functionality
> ^z^z stopped
>
> However, with MI, we are not getting the 'running' and 'stopped' tokens.
This is by design, at least for now. Emitting *stopped for calling functions in
inferiour might cause the frontend to reload program state again, which will
cause expressions with functions calls to be reevaluated, which will cause
further *stop, etc. Why is this information necessary for you? Note that I've
posted a patch to optionally enable running/stopped notification for function
calls, I just did not press it further due to lack of support.
- Volodya
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-08-01 23:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <488FE9AF.5060008@mentor.com>
[not found] ` <488FF89A.3020609@mentor.com>
2008-08-01 23:34 ` Query regarding GDB-Mi interface Nick Roberts
2008-07-30 6:53 Pankaj Pal
2008-07-30 7:07 ` Vladimir Prus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox