This is the mail archive of the gdb@sourceware.org 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: CLI commands in MI


On Thu, May 11, 2006 at 06:01:55PM +1200, Nick Roberts wrote:
> Bob Rossi writes:
>  > I'm thinking it would be a good idea to remove the ability to enter CLI
>  > commands into the MI interpreter. Does anyone disagree?
> 
> Yes.  I find it very convenient to see whats going on.  To get to a given
> execution state its easier type the CLI command directly, rather than the MI
> one which is generally longer and doesn't allow abbreviations, or prefix
> everything with -interpreter-exec.

OK, well maybe if someone types a CLI command, internally we make it do
the same thing -interpreter-exec console ... does? That would still make
me happy. Although I read below you said that's the case. Either it's
not the case, or it is and my GDB is old. I'll have to investigate.

>  > I think the only thing it can cause is confusion. Especially since
>  > entering the '-exec-run' command gives different results than the
>  > '-interpreter-exec console "r"' command which gives different results
>  > than the 'r' command.
> 
> I don't how you can say that as directly entered CLI commands now (implicitly)
> use -interpreter-exec console.  AFAICS the only difference is the extra &"r\n".

Hmmm, that's not the case for me. Is this becase I'm using an older
version of GDB?

$ gdb --version
GNU gdb 6.3-debian

(gdb)
b main
&"b main\n"
^done
(gdb)
r
&"r\n"
^done,reason="breakpoint-hit",bkptno="1",thread-id="0",frame={addr="0x08048364",func="main",args=[{name="argc",value="1"},{name="argv",value="0xbf9d1464"}],file="main.c",line="4"}
(gdb)

(gdb)
-interpreter-exec console "b main"
~"Breakpoint 1 at 0x8048364: file main.c, line 4.\n"
^done
(gdb)
-interpreter-exec console "r"
~"Starting program: /home/bob/cvs/gdbmi/builddir/src/main \n"
~"\n"
~"Breakpoint 1, main (argc=1, argv=0xbfbcd7a4) at main.c:4\n"
~"4\t  argc = 1;\n"
^done
(gdb)

>  > Now that -interpreter-exec is available, is there any reason beyond
>  > trying to confuse us all that console commands are allowed?
> 
> No one is forcing you to use it.  Why would you want to force others not
> to use it?

Because it's a totally useless feature that gives incorrect results.
Also, FE's might actually use it!

Bob Rossi


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