Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@gnu.org>
To: Andrew Cagney <cagney@gnu.org>
Cc: Nick Roberts <nickrob@gnu.org>, Alain Magloire <alain@qnx.com>,
	gdb@sources.redhat.com
Subject: Re: How does GDB/MI give the current frame
Date: Mon, 12 Jul 2004 20:09:00 -0000	[thread overview]
Message-ID: <16626.56338.385281.264806@nick.uklinux.net> (raw)
In-Reply-To: <40F2986D.4010205@gnu.org>

Andrew Cagney writes:
 > >  > >  > > -> -interpreter cli "up"
 > >  > >  > > <- ~"info on new frame..."
 > >  > >  > > <- *select-frame,<frame-info>...
 > >  > >  > > <- done
 > >  > 
 > >  > Note that the interpreter case is key, it lets the GUI respond to 
 > >  > operations on the command line.
 > > 
 > > On my gdb, -interpreter-exec cli "up" gives:
 > > 
 > > ^error,msg="mi_cmd_interpreter_exec: could not find interpreter \"cli\""
 > > (gdb) 
 > > 
 > > I'm still lost here.
 > 
 > Sorry s/cli/console/, teach me to write something from memory.

In that case, I disagree strongly with the suggestion since I think that
"-interpreter-exec console" should only give quoted CLI output (plus prefix
character). I thought that was the whole idea as it allows front ends to keep
the console. Typing CLI input in directly currently gives a mixture of CLI/MI
output but this is fine as it is only a temporary/ad hoc means of accessing
the CLI. In Emacs, I will run commands from the console with
"-interpreter-exec console" and check the status of gdb with a set of MI
commands run behind the users back. I imagine a lot of others will do the
same, so please don't change this.

Earlier, you said

> with similar for -stack-select-frame:

> -> -stack-select-frame 1
> <- *select-frame,<frame-info>,....
> <- done

Can you elaborate? How does "*select-frame" get printed? Does it trigger
anything internally?

 > >  >                          ....  How would something like:
 > >  > 
 > >  > -thread 2 -<something else>
 > >  > ^done
 > >  > -thread 2 -frame 3 -<something else>
 > >  > -frame 3 -<something else>
 > >  > ^done
 > > 
 > > Or values could be printed for all threads:
 > > 
 > > -var-evaluate-expression var1
 > > ^done,values=[{thread-id="0",value="0"},{thread-id="1",value="4"},...]
 > > 
 > > and likewise for other mi commands. This would have the disadvantage of
 > > breaking existing behaviour but I imagine a user might want to see the value
 > > of a variable across all threads and would not wish to create a variable
 > > object for each thread.
 > 
 > For existing commands, I don't get warm fuzzies.  Assuming that the GUI 
 > is only displaying one thread, there's no need to supply the value 
 > across all threads.
 > 
 > As an extension, I guess, why not.  Something like:
 > 
 > -thread-apply 1 2 3 4 -- -something
 > ^done,result=[{thread-id="1",result=<result>},{thread-id="2",error=<something>},...]
 > 
 > or
 > 
 > -thread-apply * -- -something
 > ^done,result=[{thread-id="1",result=...},...]
 > 
 > that is, it returns a list of results from each individual command - 
 > that makes more sense.

Yes, that sounds like a good idea. Is it easy to implement?

Nick


  reply	other threads:[~2004-07-12 18:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-24 22:54 Nick Roberts
2004-06-24 23:17 ` Daniel Jacobowitz
2004-06-26  9:10   ` Nick Roberts
2004-06-26 14:59     ` Daniel Jacobowitz
2004-06-27  2:12     ` Andrew Cagney
2004-06-30 20:47       ` Alain Magloire
     [not found]       ` <200406302047.QAA29956@smtp.ott.qnx.com>
2004-07-02 17:29         ` Nick Roberts
2004-07-08 22:15           ` Andrew Cagney
2004-07-08 23:07             ` Alain Magloire
2004-07-11 22:49             ` Nick Roberts
2004-07-12 14:24               ` Andrew Cagney
2004-07-12 20:09                 ` Nick Roberts [this message]
2004-07-15 14:48                   ` Andrew Cagney
2004-07-15 19:50                     ` Nick Roberts
2004-07-15 20:19                       ` Jason Molenda
2004-07-15 21:08                         ` Jason Molenda
2004-07-16 14:12                           ` Alain Magloire
2004-07-16 14:08                         ` Alain Magloire
     [not found]                         ` <200407161404.KAA02192@smtp.ott.qnx.com>
2004-07-18 21:07                           ` Nick Roberts
2004-07-26 21:31                             ` Andrew Cagney
     [not found]             ` <200407082307.TAA09285@smtp.ott.qnx.com>
2004-07-11 22:49               ` Nick Roberts
2004-07-12 18:30                 ` Alain Magloire
     [not found]                 ` <200407121751.NAA24942@smtp.ott.qnx.com>
2004-07-14  4:00                   ` Nick Roberts
2004-06-25 15:12 ` Andrew Cagney

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=16626.56338.385281.264806@nick.uklinux.net \
    --to=nickrob@gnu.org \
    --cc=alain@qnx.com \
    --cc=cagney@gnu.org \
    --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