From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28083 invoked by alias); 4 Nov 2009 15:02:39 -0000 Received: (qmail 28067 invoked by uid 22791); 4 Nov 2009 15:02:36 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Nov 2009 15:02:32 +0000 Received: from list by lo.gmane.org with local (Exim 4.50) id 1N5hN9-000739-OL for gdb@sources.redhat.com; Wed, 04 Nov 2009 16:02:07 +0100 Received: from h86-62-88-129.ln.rinet.ru ([86.62.88.129]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Nov 2009 16:02:07 +0100 Received: from vladimir by h86-62-88-129.ln.rinet.ru with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 Nov 2009 16:02:07 +0100 To: gdb@sources.redhat.com From: Vladimir Prus Subject: Re: GDB GUI Date: Wed, 04 Nov 2009 15:02:00 -0000 Message-ID: References: <100F84AB-4BCE-427F-9796-3D2162D97DC9@gmail.com> <200911021436.46359.sergiodj@linux.vnet.ibm.com> <0F6AD058-C87F-4E6E-9CA2-0B7F2342AD5E@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.9 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: 2009-11/txt/msg00037.txt.bz2 Marco Menegazzi wrote: > > Thank you. > > I've already seen that documentation but my problem is that it does > not explain how to connect to this interface through code. It explains > how it is but not how to use it ... I want to connect through my java > code but the only idea I have is to call it directly from the code > with Runtime.exec ... but then I ask myself why to use gdb/mi that > returns a more complex output instead of calling directly gdb and > parse the stout to get what I want? Eclipse CDT has an implementation of all this. Look for things such as MIInferior, RxThread and TxThread in a full CDT checkout. As for parsing stdout -- traditional GDB output is meant for humans. Unless you plan on adding AI module to your application, it's just not possible to reliably parse it. - Volodya