From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11454 invoked by alias); 28 Aug 2007 08:56:01 -0000 Received: (qmail 11315 invoked by uid 22791); 28 Aug 2007 08:56:00 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 28 Aug 2007 08:55:52 +0000 Received: from kahikatea.snap.net.nz (204.40.255.123.static.snap.net.nz [123.255.40.204]) by viper.snap.net.nz (Postfix) with ESMTP id 5DFB13D9DF4; Tue, 28 Aug 2007 20:55:49 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 007CB8FC6D; Tue, 28 Aug 2007 20:55:45 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18131.58128.433536.819432@kahikatea.snap.net.nz> Date: Tue, 28 Aug 2007 08:56:00 -0000 To: =?iso-8859-1?q?Andr=E9_P=F6nitz?= Cc: gdb@sourceware.org Subject: Re: Questions about gdb/mi support on the Mac In-Reply-To: <200708281029.27514.apoenitz@trolltech.com> References: <46CF1A71.1020002@sun.com> <200708281029.27514.apoenitz@trolltech.com> X-Mailer: VM 7.19 under Emacs 22.1.50.12 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00226.txt.bz2 > > 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