Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nick@nick.uklinux.net>
To: Elena Zannoni <ezannoni@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: Questions about GDB/MI
Date: Thu, 06 Feb 2003 00:44:00 -0000	[thread overview]
Message-ID: <15937.44833.337142.403705@nick.uklinux.net> (raw)
In-Reply-To: <15936.22858.719117.119973@localhost.redhat.com>


 ...
 >  > I get:
 >  > 
 >  > -> -stop
 >  > <- ^error,msg="Undefined MI command: stop"
 >  > <- (gdb) 
 >  > 
 > 
 > Hmmm, bogus docs. 'stop' as a command hasn't been implemented. There
 > is a comment in the .texinfo file about this. The command that does this is 
 > available only on async targets (remote), and is called exec-interrupt.
 > 
 > Could you file a bug report?

I have done this.

 ...
 > Are you lookng at html or ps?  In the .texinfo file the text is
 > correct, it is just not formatted properly:
 > 
 > @example
 > -> print 1+2
 > <- &"print 1+2\n"
 > <- ~"$1 = 3\n"
 > <- ^done
 > <- (@value{GDBP})
 > @end example
 > 
 > could you file another bug report?

This was my mistake. I'm now looking at the *current* documentation.

 >  > Running a simple program, I get a sequence like:
 >  > 
 >  > -> -exec-next
 >  > <- ^running
 >  > <- (gdb) 
 >  > <- *stopped,reason="end-stepping-range",thread-id="0",frame={addr="0x08048578",func="main",args=[],file="myprog.c",line="18"}
 >  > <- (gdb) 
 ...
 >  > 
 >  > i.e isn't that one (gdb) too many?
 >  > 
 > 
 > I get the extra prompt too. Are you running on a native target?
 > Or on a remote target? On a remote target, the async capability of gdb
 > when running the inferior is real (if using 'target async'), while on
 > native, it is simulated. I wonder if there is a mismatch somewhere.
 > Anyway, if you are just running natively, it may be simply another doc
 > error.
 > 

 I'm doing everything on one machine (=native?) but I don't see how this
 makes it a doc error unless there are *meant* to be two (gdb)'s for native
 and one for remote targets.

 > Some of the documentation was written before we implemented the
 > commands, it evolved from a design doc into a user guide.
 > 
 >  > My simple program prints out:
 >  > 
 >  > a[0]=0
 >  > 
 >  > shouldn't that be:
 >  > 
 >  > @"a[0]=0"

 > Don't remember what the status of this is. Look through the bugs
 > database, for open MI bugs. But I see a testcase in the testsuite, and
 > code in the mi directory, so it should work.

This seems a pretty fundamental requirement. If it doesn't work, for native
targets say, how does Project Builder do stream separation in these cases?

 >  > Annotation uses ^Z^Z to flag things which I guess is not normal
 >  > output. What would happen if the program being debugged printed out
 >  > strings like *stopped or ^running? These only contain ASCII characters
 >  > after all.
 >  > 
 > 
 > we added the number prefixes to the command, to help in cases like these
 > if you say:
 > 222-exec-next
 > you would get
 > 222^running
 > 222*stopped

Hmm. I'm not sure how I would use that as a strategy. But, as Daniel Jacobowitz
points out , if program's output is always escaped with the prefix above, there
may not be a problem.

 >  >                      ...every time I use `cvs update' in src, even
 >  > without the -d option it keeps on trying to give me other directories
 >  > like binutils. I have to go into gdb and do `cvs update' there where I
 >  > just get gdbtk but I'm worried that then I might be missing other files
 >  > that I need..
 >  > 
 > 
 > yes, update -d at the top level brings in everything in the
 > repository, i.e.  ignores the fact you checked out just a single
 > module.  Use cvs update -dP (P prunes empty directories) in the gdb
 > directory. But if you followed the instructions from the web site, you
 > should have everything.

But I've not used -d. If I follow the instructions from the web site, it appears
that I *do* get everything but I just want gdb.

I hope that I sound confused rather than ungrateful.

Thanks for your help.

Nick


  parent reply	other threads:[~2003-02-06  0:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-04 23:32 Nick Roberts
2003-02-05  0:18 ` Elena Zannoni
2003-02-05  0:33   ` Daniel Jacobowitz
2003-02-05 14:44     ` Elena Zannoni
2003-02-06  0:44   ` Nick Roberts [this message]
2003-02-06 15:26     ` Elena Zannoni
2003-02-05  7:23 ` Jim Blandy
2003-02-05 14:45   ` Elena Zannoni
2003-02-09 15:24   ` GDB/MI stream separation Nick Roberts

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=15937.44833.337142.403705@nick.uklinux.net \
    --to=nick@nick.uklinux.net \
    --cc=ezannoni@redhat.com \
    --cc=gdb@sources.redhat.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