Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Machine interface
@ 2005-03-18 16:01 Greg Law
  2005-03-18 16:05 ` Bob Rossi
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Law @ 2005-03-18 16:01 UTC (permalink / raw)
  To: gdb

Hi,

I'm trying to find some info on GDB/MI.  I've read the info pages.  They 
seem to be half finished, and specifically don't talk about one actually 
interfaces with gdb/mi.  ie. it doesn't seem to be via stdin of the gdb 
processes (typing -break-point at it causes "unknown command" errors.  
Do I need to open a socket to it or some such?  Or do I just have the MI 
syntax wrong?

TIA,

Greg



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Machine interface
  2005-03-18 16:01 Machine interface Greg Law
@ 2005-03-18 16:05 ` Bob Rossi
  2005-03-18 16:11   ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Bob Rossi @ 2005-03-18 16:05 UTC (permalink / raw)
  To: Greg Law; +Cc: gdb

On Fri, Mar 18, 2005 at 04:00:57PM +0000, Greg Law wrote:
> Hi,
> 
> I'm trying to find some info on GDB/MI.  I've read the info pages.  They 
> seem to be half finished, and specifically don't talk about one actually 
> interfaces with gdb/mi.  ie. it doesn't seem to be via stdin of the gdb 
> processes (typing -break-point at it causes "unknown command" errors.  
> Do I need to open a socket to it or some such?  Or do I just have the MI 
> syntax wrong?

If you start GDB on the command line, you can use GDB the same way you
use the CLI, of course with different syntax.

The documentation for setting breakpoints in MI mode is here,
   http://sources.redhat.com/gdb/current/onlinedocs/gdb_25.html#SEC250

in particular, try, '-break-insert main'

Bob Rossi


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Machine interface
  2005-03-18 16:05 ` Bob Rossi
@ 2005-03-18 16:11   ` Daniel Jacobowitz
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2005-03-18 16:11 UTC (permalink / raw)
  To: Greg Law, gdb

On Fri, Mar 18, 2005 at 11:05:36AM -0500, Bob Rossi wrote:
> On Fri, Mar 18, 2005 at 04:00:57PM +0000, Greg Law wrote:
> > Hi,
> > 
> > I'm trying to find some info on GDB/MI.  I've read the info pages.  They 
> > seem to be half finished, and specifically don't talk about one actually 
> > interfaces with gdb/mi.  ie. it doesn't seem to be via stdin of the gdb 
> > processes (typing -break-point at it causes "unknown command" errors.  
> > Do I need to open a socket to it or some such?  Or do I just have the MI 
> > syntax wrong?
> 
> If you start GDB on the command line, you can use GDB the same way you
> use the CLI, of course with different syntax.
> 
> The documentation for setting breakpoints in MI mode is here,
>    http://sources.redhat.com/gdb/current/onlinedocs/gdb_25.html#SEC250
> 
> in particular, try, '-break-insert main'

More specifically, Greg, I think you're missing the "-i=mi" option.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Machine interface
  2003-08-19 13:30       ` Andrew Cagney
@ 2003-08-19 14:00         ` Alain Magloire
  0 siblings, 0 replies; 6+ messages in thread
From: Alain Magloire @ 2003-08-19 14:00 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: jacques, gdb

> 
> Have a look at the -var-* commands.  The testsuite is currently the best 
> source of examples.
> 

In other words try:

(gdb)
-var-create - * b
...
-var-evaluate-expression var1


Using the varobj, as shown to be more reliable.
and we use -data-evaluate-expression only for hovering or quick evaluation.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Machine interface
  2003-08-19  6:45     ` Machine interface jacques
@ 2003-08-19 13:30       ` Andrew Cagney
  2003-08-19 14:00         ` Alain Magloire
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Cagney @ 2003-08-19 13:30 UTC (permalink / raw)
  To: jacques; +Cc: gdb

Have a look at the -var-* commands.  The testsuite is currently the best 
source of examples.

Andrew


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Machine interface
  2003-08-18 19:33   ` Daniel Jacobowitz
@ 2003-08-19  6:45     ` jacques
  2003-08-19 13:30       ` Andrew Cagney
  0 siblings, 1 reply; 6+ messages in thread
From: jacques @ 2003-08-19  6:45 UTC (permalink / raw)
  Cc: gdb

Hello, I've been doing some MI interface testing, and am in need of some 
grammar clarifications. After running until a breakpoint, I do the 
following:

(gdb)
-data-evaluate-expression b
^done,value="{<_Vector_base<int,std::allocator<int> >> = 
{<_Vector_alloc_base<int,std::allocator<int>,true>> = {_M_start = 
0x804aa50, _M_finish = 0x804aa58, _M_end_of_storage = 0x804aa58}, <No 
data fields>}, <No data fields>}"

Which is of the format:
output => result-record => "^" result-class ( "," result )
result-class => "done"
result => variable "=" value
value => tuple
tuple => "{" result "}"
...

Now all is well and fine, however the meat of the output, being the 
variable and value nonterminal symbols are unparseable! Indeed, they are 
composed of:
variable => string
value => const => c-string (since I can't fanthom not running into a 
const value after a while)

In this case, <_Vector_base<....>> is unparseable, and I wouldn't be 
able to know how to handle all cases. Furthermore, I don't see the 
distinction between c-string and string. I see how the production would 
depend on the programming language being being debugged, but it seems 
quite important to me.
--Jacques





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-03-18 16:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-18 16:01 Machine interface Greg Law
2005-03-18 16:05 ` Bob Rossi
2005-03-18 16:11   ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2003-06-03 22:09 Amusing problem in current libthread_db Daniel Jacobowitz
2003-06-03 22:30 ` Roland McGrath
2003-08-18 19:33   ` Daniel Jacobowitz
2003-08-19  6:45     ` Machine interface jacques
2003-08-19 13:30       ` Andrew Cagney
2003-08-19 14:00         ` Alain Magloire

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox