This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: set prompt & MI


Does gdb plan on providing the 'set prompt' command with MI?

example below.

(gdb) -interpreter-exec console "set prompt (foo) "
^done
(gdb)

The "(gdb)\n" in the above is the MI output terminator:
http://sources.redhat.com/gdb/current/onlinedocs/gdb_25.html#SEC213
and not CLI prompt. The CLI's prompt will have been changed, it just isn't possible to directly see it. Last time this came it, it was suggested that the MI "(gdb)\n" be replaced with "(mi)\n".


Also, I kind of think that the prompt should be separated from what the
user/front end sees. Maybe do prompt= to tell the front end that the prompt has been reached and what it is. That way front ends are not looking for the string "(gdb) ".


^done,prompt="(gdb) "

Two possabilities, the -interpreter-exec console output include the CLI prompt vis:


(gdb)
-interpreter-exec console "set prompt (foo) "
~"(foo) "
^done
(gdb)

or, MI notify the GUI of changes to internal variables vis:

(gdb)
-interpreter-exec console "set prompt (foo) "
*set,prompt="(foo) "
^done
(gdb)

or, both. I'm not sure how robust or feasible a generic "*set" event is though.

Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]