This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Make -exec-run and -exec-until into 'real' MI commands
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: Vladimir Prus <vladimir at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 13 Jan 2010 15:09:58 -0500
- Subject: Re: Make -exec-run and -exec-until into 'real' MI commands
- References: <201001131629.25873.vladimir@codesourcery.com>
On Wed, Jan 13, 2010 at 04:29:25PM +0300, Vladimir Prus wrote:
>
> At present, '-exec-run' and '-exec-until' are directly routed
> to CLI, with very little MI intervention. I have tried to fix
> that before, but there were backward compatibility concerns.
>
> While working on multiexec MI patches, I really needed to have
> -exec-run handled in MI, so I've made another attempt, which
> is attached. Comments?
How much compatibility are you looking for?
It takes a long path through GDB, but the argument to -exec-run today
eventually gets passed to the shell with no additional quoting. If
I type:
(gdb) run a b "a b" "\""
then GDB does:
execve("/bin/zsh", ["/bin/zsh", "-c", "exec /usr/bin/gdb a b \"a b\" \"\\\"\""], [/* 64 vars */])
That's the same as typing at a shell prompt:
exec /usr/bin/gdb a b "a b" "\""
Your patch doesn't undo the effect of mi_parse_argv, so this
won't be preserved. Can we just save the unparsed argv somehow?
I don't remember the previous time this came up, but are there front
ends that pass arguments to -exec-run? It's not documented as
accepting any.
--
Daniel Jacobowitz
CodeSourcery