public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* GDB/MI revisited
@ 2003-02-07 20:20 Nick Roberts
  2003-02-26 16:21 ` Andrew Cagney
  0 siblings, 1 reply; 9+ messages in thread
From: Nick Roberts @ 2003-02-07 20:20 UTC (permalink / raw)
  To: gdb


Andrew Cagney writes:

 > Can you post a transcript of a typical EMACS <-> GDB session?

It would depend on the user, of course, but typically GDB commands would be
passed to gdb by two means: explicitly through the GUD buffer or through a
lisp function. The latter could be invoked through the minibuffer, a key sequence
or through the toolbar.

I'm exploring two approaches:

1) Running gdb normally and accessing GDB/MI using "interpreter mi mi-command".

2) Running gdb with GDB/MI (-interp=mi) and accessing CLI using
   "-interpreter-exec console cli-command".

In both cases, the source file display is only updated if commands
are issued through a lisp function. This is because in the first case the lisp
function is bound to an mi command indirectly e.g

(gud-def gud-run    "interpreter mi -exec-run"  nil    "Run the program.")

and in the second case it is bound to one directly e.g 

(gud-def gud-run    "-exec-run"	     nil    "Run the program.")

and these output the out of bound record `*stopped' which emacs can parse for
the program location.

Conversely, in both cases, GDB commands entered through the GUD buffer do not
currently generate `*stopped' and source display is not updated.

QUESTION: Is it possible to modify GDB so that it does generate `*stopped' in
these cases?

The first case would require that a cli command generates out of bound
records. This would require a change in behaviour in gdb so need its own flag
e.g gdb -emacs

The second case would require that "-interpreter-exec console cli-command"
generates out of bound records. This could be its defined behaviour as it
probably would be appropriate to others.

Nick

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-03-04  0:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-07 20:20 GDB/MI revisited Nick Roberts
2003-02-26 16:21 ` Andrew Cagney
2003-02-28 21:35   ` Nick Roberts
2003-03-02  2:35     ` Andrew Cagney
2003-03-02 23:57       ` Nick Roberts
2003-03-03  1:04         ` Bob Rossi
2003-03-03 19:09         ` Andrew Cagney
2003-03-03 20:44           ` Nick Roberts
2003-03-04  0:12             ` Andrew Cagney

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).