* CLI commands in MI
@ 2006-05-11 3:39 Bob Rossi
2006-05-11 6:08 ` Daniel Jacobowitz
2006-05-11 6:39 ` Nick Roberts
0 siblings, 2 replies; 13+ messages in thread
From: Bob Rossi @ 2006-05-11 3:39 UTC (permalink / raw)
To: gdb
I'm thinking it would be a good idea to remove the ability to enter CLI
commands into the MI interpreter. Does anyone disagree?
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.
Now that -interpreter-exec is available, is there any reason beyond
trying to confuse us all that console commands are allowed?
Thanks,
Bob Rossi
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: CLI commands in MI
2006-05-11 3:39 CLI commands in MI Bob Rossi
@ 2006-05-11 6:08 ` Daniel Jacobowitz
2006-05-11 10:24 ` Joel Brobecker
2006-05-11 10:40 ` Bob Rossi
2006-05-11 6:39 ` Nick Roberts
1 sibling, 2 replies; 13+ messages in thread
From: Daniel Jacobowitz @ 2006-05-11 6:08 UTC (permalink / raw)
To: gdb
On Wed, May 10, 2006 at 10:26:50PM -0400, Bob Rossi wrote:
> I'm thinking it would be a good idea to remove the ability to enter CLI
> commands into the MI interpreter. Does anyone disagree?
No way. The fact is, the MI command set is not complete, and
-interpreter-exec is still recent. I would expect most front ends
to still require this support, for the indefinite future.
Now, if we look at the command set someday (around mi4 maybe), and find
that it's become complete, then perhaps we can disable the CLI hack.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 13+ messages in thread
* CLI commands in MI
2006-05-11 3:39 CLI commands in MI Bob Rossi
2006-05-11 6:08 ` Daniel Jacobowitz
@ 2006-05-11 6:39 ` Nick Roberts
2006-05-11 10:46 ` Bob Rossi
1 sibling, 1 reply; 13+ messages in thread
From: Nick Roberts @ 2006-05-11 6:39 UTC (permalink / raw)
To: Bob Rossi; +Cc: gdb
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.
> 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".
> 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?
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: CLI commands in MI
2006-05-11 6:08 ` Daniel Jacobowitz
@ 2006-05-11 10:24 ` Joel Brobecker
2006-05-11 12:46 ` Nick Roberts
2006-05-11 10:40 ` Bob Rossi
1 sibling, 1 reply; 13+ messages in thread
From: Joel Brobecker @ 2006-05-11 10:24 UTC (permalink / raw)
To: gdb
> Now, if we look at the command set someday (around mi4 maybe), and find
> that it's become complete, then perhaps we can disable the CLI hack.
How about if the front-end wants to provide a debugger console, so
that the user can also enter commands manually? I would have hoped
that we could still allow the user to use CLI commands in that console,
because MI commands output are somewhat difficult to read for a normal
human.
Basically, the front-end would take the user command in CLI format,
send it to the MI interpreter via this feature, and then get the
output back, extract it from the MI output, and then display it
on the console.
Is there another way of doing this?
--
Joel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: CLI commands in MI
2006-05-11 6:08 ` Daniel Jacobowitz
2006-05-11 10:24 ` Joel Brobecker
@ 2006-05-11 10:40 ` Bob Rossi
2006-05-11 10:57 ` Nick Roberts
1 sibling, 1 reply; 13+ messages in thread
From: Bob Rossi @ 2006-05-11 10:40 UTC (permalink / raw)
To: gdb
On Wed, May 10, 2006 at 11:41:14PM -0400, Daniel Jacobowitz wrote:
> On Wed, May 10, 2006 at 10:26:50PM -0400, Bob Rossi wrote:
> > I'm thinking it would be a good idea to remove the ability to enter CLI
> > commands into the MI interpreter. Does anyone disagree?
>
> No way. The fact is, the MI command set is not complete, and
> -interpreter-exec is still recent. I would expect most front ends
> to still require this support, for the indefinite future.
Whoa, I don't think it matters if FE's are using this feature. Read the
manual,
This mechanism is provided as an aid to developers of GDB/MI clients and not as
a reliable interface into the CLI. Since the command is being interpreteted in an
environment that assumes GDB/MI behaviour, the exact output of such commands is
likely to end up being an un-supported hybrid of GDB/MI and CLI output.
Bob Rossi
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: CLI commands in MI
2006-05-11 6:39 ` Nick Roberts
@ 2006-05-11 10:46 ` Bob Rossi
2006-05-11 10:48 ` Nick Roberts
0 siblings, 1 reply; 13+ messages in thread
From: Bob Rossi @ 2006-05-11 10:46 UTC (permalink / raw)
To: Nick Roberts; +Cc: gdb
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
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: CLI commands in MI
2006-05-11 10:46 ` Bob Rossi
@ 2006-05-11 10:48 ` Nick Roberts
2006-05-11 10:54 ` Bob Rossi
0 siblings, 1 reply; 13+ messages in thread
From: Nick Roberts @ 2006-05-11 10:48 UTC (permalink / raw)
To: Bob Rossi; +Cc: gdb
> > 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
Yes, this is the change:
2005-02-20 Andrew Cagney <cagney@gnu.org>
* mi/mi-main.c (captured_mi_execute_command): Use
mi_cmd_interpreter_exec.
Let's keep the discussion relative to GDB in CVS.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: CLI commands in MI
2006-05-11 10:48 ` Nick Roberts
@ 2006-05-11 10:54 ` Bob Rossi
0 siblings, 0 replies; 13+ messages in thread
From: Bob Rossi @ 2006-05-11 10:54 UTC (permalink / raw)
To: Nick Roberts; +Cc: gdb
On Thu, May 11, 2006 at 10:45:34PM +1200, Nick Roberts wrote:
> > > 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
>
>
> Yes, this is the change:
>
> 2005-02-20 Andrew Cagney <cagney@gnu.org>
>
> * mi/mi-main.c (captured_mi_execute_command): Use
> mi_cmd_interpreter_exec.
>
> Let's keep the discussion relative to GDB in CVS.
I see! Thanks Nick for the info.
Bob Rossi
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: CLI commands in MI
2006-05-11 10:40 ` Bob Rossi
@ 2006-05-11 10:57 ` Nick Roberts
2006-05-11 11:24 ` Bob Rossi
0 siblings, 1 reply; 13+ messages in thread
From: Nick Roberts @ 2006-05-11 10:57 UTC (permalink / raw)
To: Bob Rossi; +Cc: gdb
> > > I'm thinking it would be a good idea to remove the ability to enter CLI
> > > commands into the MI interpreter. Does anyone disagree?
> >
> > No way. The fact is, the MI command set is not complete, and
> > -interpreter-exec is still recent. I would expect most front ends
> > to still require this support, for the indefinite future.
>
> Whoa, I don't think it matters if FE's are using this feature. Read the
> manual,
>
> This mechanism is provided as an aid to developers of GDB/MI clients and
> not as a reliable interface into the CLI. Since the command is being
> interpreteted in an environment that assumes GDB/MI behaviour, the exact
> output of such commands is likely to end up being an un-supported hybrid
> of GDB/MI and CLI output.
There was thread about this paragraph on this mailing list a month ago. It was
written before Jim Ingham, Andrew Cagney et al wrote -interpreter-exec to
switch interpreters, so the lack of reliability is not true anymore.
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: CLI commands in MI
2006-05-11 10:57 ` Nick Roberts
@ 2006-05-11 11:24 ` Bob Rossi
2006-05-11 19:31 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Bob Rossi @ 2006-05-11 11:24 UTC (permalink / raw)
To: Nick Roberts; +Cc: gdb
On Thu, May 11, 2006 at 10:52:10PM +1200, Nick Roberts wrote:
> > > > I'm thinking it would be a good idea to remove the ability to enter CLI
> > > > commands into the MI interpreter. Does anyone disagree?
> > >
> > > No way. The fact is, the MI command set is not complete, and
> > > -interpreter-exec is still recent. I would expect most front ends
> > > to still require this support, for the indefinite future.
> >
> > Whoa, I don't think it matters if FE's are using this feature. Read the
> > manual,
> >
> > This mechanism is provided as an aid to developers of GDB/MI clients and
> > not as a reliable interface into the CLI. Since the command is being
> > interpreteted in an environment that assumes GDB/MI behaviour, the exact
> > output of such commands is likely to end up being an un-supported hybrid
> > of GDB/MI and CLI output.
>
> There was thread about this paragraph on this mailing list a month ago. It was
> written before Jim Ingham, Andrew Cagney et al wrote -interpreter-exec to
> switch interpreters, so the lack of reliability is not true anymore.
OK, we should update the manual. Also, unless we update to mi3, it's
bad that the FE has no way of knowing if there GDB is broken or not.
Bob Rossi
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: CLI commands in MI
2006-05-11 10:24 ` Joel Brobecker
@ 2006-05-11 12:46 ` Nick Roberts
0 siblings, 0 replies; 13+ messages in thread
From: Nick Roberts @ 2006-05-11 12:46 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb
> > Now, if we look at the command set someday (around mi4 maybe), and find
> > that it's become complete, then perhaps we can disable the CLI hack.
>
> How about if the front-end wants to provide a debugger console, so
> that the user can also enter commands manually? I would have hoped
> that we could still allow the user to use CLI commands in that console,
> because MI commands output are somewhat difficult to read for a normal
> human.
Thats what "-interpreter-exec console" is for. Bob is suggesting removing the
option of sending CLI commands directly to MI (which actually works pretty much
the same way now).
> Basically, the front-end would take the user command in CLI format,
> send it to the MI interpreter via this feature, and then get the
> output back, extract it from the MI output, and then display it
> on the console.
>
> Is there another way of doing this?
It switches the interpreter, executes the command, then switches back.
Don't ask me for the details though!
--
Nick http://www.inet.net.nz/~nickrob
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: CLI commands in MI
2006-05-11 11:24 ` Bob Rossi
@ 2006-05-11 19:31 ` Eli Zaretskii
2006-05-11 20:57 ` Bob Rossi
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2006-05-11 19:31 UTC (permalink / raw)
To: Nick Roberts, gdb
> Date: Thu, 11 May 2006 06:58:00 -0400
> From: Bob Rossi <bob_rossi@cox.net>
> Cc: gdb@sources.redhat.com
>
> > There was thread about this paragraph on this mailing list a month ago. It was
> > written before Jim Ingham, Andrew Cagney et al wrote -interpreter-exec to
> > switch interpreters, so the lack of reliability is not true anymore.
>
> OK, we should update the manual.
Please do. Thanks in advance.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: CLI commands in MI
2006-05-11 19:31 ` Eli Zaretskii
@ 2006-05-11 20:57 ` Bob Rossi
0 siblings, 0 replies; 13+ messages in thread
From: Bob Rossi @ 2006-05-11 20:57 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Nick Roberts, gdb
On Thu, May 11, 2006 at 09:32:57PM +0300, Eli Zaretskii wrote:
> > Date: Thu, 11 May 2006 06:58:00 -0400
> > From: Bob Rossi <bob_rossi@cox.net>
> > Cc: gdb@sources.redhat.com
> >
> > > There was thread about this paragraph on this mailing list a month ago. It was
> > > written before Jim Ingham, Andrew Cagney et al wrote -interpreter-exec to
> > > switch interpreters, so the lack of reliability is not true anymore.
> >
> > OK, we should update the manual.
>
> Please do. Thanks in advance.
Yup, already working on something, probably post tonight.
Bob Rossi
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2006-05-11 19:25 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-11 3:39 CLI commands in MI Bob Rossi
2006-05-11 6:08 ` Daniel Jacobowitz
2006-05-11 10:24 ` Joel Brobecker
2006-05-11 12:46 ` Nick Roberts
2006-05-11 10:40 ` Bob Rossi
2006-05-11 10:57 ` Nick Roberts
2006-05-11 11:24 ` Bob Rossi
2006-05-11 19:31 ` Eli Zaretskii
2006-05-11 20:57 ` Bob Rossi
2006-05-11 6:39 ` Nick Roberts
2006-05-11 10:46 ` Bob Rossi
2006-05-11 10:48 ` Nick Roberts
2006-05-11 10:54 ` Bob Rossi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox