public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@specifix.com>
To: Guillaume MENANT <guillaume.menant@geensys.com>
Cc: gdb@sourceware.org
Subject: Re: GDB commands
Date: Mon, 26 Nov 2007 19:14:00 -0000	[thread overview]
Message-ID: <1196103707.2501.42.camel@localhost.localdomain> (raw)
In-Reply-To: <13909280.post@talk.nabble.com>

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



  parent reply	other threads:[~2007-11-26 19:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-20 13:44 Guillaume MENANT
2007-11-23  9:37 ` Guillaume MENANT
2007-11-23 11:05   ` Vladimir Prus
2007-11-23 12:27     ` Guillaume MENANT
2007-11-23 12:58       ` Vladimir Prus
2007-11-26 19:04     ` Michael Snyder
2007-11-26 19:21       ` Vladimir Prus
2007-11-26 19:14   ` Michael Snyder [this message]
2007-11-26 19:22     ` Daniel Jacobowitz
2007-11-26 19:30       ` Michael Snyder
2007-11-27 10:46         ` Guillaume MENANT

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1196103707.2501.42.camel@localhost.localdomain \
    --to=msnyder@specifix.com \
    --cc=gdb@sourceware.org \
    --cc=guillaume.menant@geensys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).