This is the mail archive of the gdb@sourceware.org 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]

Re: Questions about gdb/mi support on the Mac


 > >     Are there other known differences between the Mac and other platforms?
 > > (I'm using gdb 6.3.5 on the Mac).
 > 
 > One thing I am aware of is the gdb/Mac sometimes produces results
 > that to not fit into the MI grammar. E.g. when listing locals
 > it returns:   9^done,locals={{name="a"},{name="w"}}

This is old style MI (mi0) output.

 > instead of:   9^done,locals=[{name="a"},{name="w"}]

Looking at Apple's mi-cmd-stack.c:

  cleanup_list = make_cleanup_ui_out_list_begin_end (uiout, locals ? "locals" : "args");

I think it will output the latter now.

 > IIRC (haven't looked at it for a while) also the output for -break-insert
 > is different.

Apple have documented some of their own commands in their version of the
GDB manual.

 > And (also IIRC) Mac gdb automatically creates MI variables when
 > running -stack-list-locals.

It can do with the "--make-varobjs" option but this doesn't seem to be
documented.

 > In case you need details (or want to be sure that I remember correctly ;-))
 > I can dig through my project history...

It's probably enough to say that you will get unreliable behaviour trying 
to use Apple GDB from a frontend that is expecting the MI output of FSF GDB.
If your frontend must run on a Mac then you either need to compile FSF GDB
for the Mac (if that's possible) or read the Apple GDB source/manual and
adapt your frontend accordingly.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


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