From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22371 invoked by alias); 26 Nov 2007 19:14:07 -0000 Received: (qmail 22363 invoked by uid 22791); 26 Nov 2007 19:14:06 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 26 Nov 2007 19:14:02 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 6478B3C113; Mon, 26 Nov 2007 10:52:25 -0800 (PST) Subject: Re: GDB commands From: Michael Snyder To: Guillaume MENANT Cc: gdb@sourceware.org In-Reply-To: <13909280.post@talk.nabble.com> References: <4742E4CF.2080408@geensys.com> <13909280.post@talk.nabble.com> Content-Type: text/plain Date: Mon, 26 Nov 2007 19:14:00 -0000 Message-Id: <1196103707.2501.42.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-4.fc7) Content-Transfer-Encoding: 7bit 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-11/txt/msg00230.txt.bz2 On Fri, 2007-11-23 at 01:37 -0800, Guillaume MENANT wrote: > Can't we know which command is mandatory ? I'm assuming that m, M, c, s, g, > and G are mandatory but i'm not sure. Sorry, didn't really understand your question at first. I'm afraid we have not really sat down and tried to list which commands are mandatory in recent times. Many of the commands are designed to be optional (and of course, any target-side gdb agent is required to quietly ignore any command that it does not understand). However, a number of commands can be used as substitutes for one another. Hence it is hard to say that one particular command is "manditory", given that it can be replaced by another command. Let me make an attempt, and please realize that I am doing this "off the top of my head". 1) You need a way to read and write memory. There are several candidates, one being the original 'm' and 'M', another being the newer 'x' and 'X' (binary encoded). 2) You need a way to read and write registers. Again there are several possible ways, for instance the original pair of commands 'g' and 'G' (read/write entire register set), another the more recent 'p' and 'P' (read/write individual register). 3) You need a way to control execution. As mentioned, there is the original pair of commands 's' and 'c' (step and continue), and there is a newer set of commands built around the string "vCont" Of the many other command sequences, most can be considered optional depending on what extra functionality you require (eg. if you need multi-thread debugging). But at this point I would have to advise you to implement the above subset, then try debugging and see what happens. Cheers, Michael