[PATCH] interpreter_exec_cmd (interps.c)
Andrew Cagney
cagney@gnu.org
Wed Feb 2 16:21:00 GMT 2005
Nick Roberts wrote:
> > Hmm, another example is:
> >
> > (gdb) interpreter console help foo
> >
>
> Well it needs to be: interpreter console "help foo"
>
> > Can you create a new minimal test "gdb.base/interpreter.exp" to sanity
> > check one of the above (and add anything else that takes your fancy :-)
> >
> > Be sure to check that the test actually fails without the test (and
> > don't forget to mention the system it was tested on). Consider that
> > pre-approved.
>
> Something like below? It might be a good idea to include more of the output
> for -var-update but I couldn't work out how to handle the newlines. I chose
> 'show version' since is a two word command (= more careful parsing required).
> I can't think of any sensible further tests at the moment but its easy to add
> more later.
Yep! Perfect! Just check it in.
> # Copyright 2005 Free Software Foundation, Inc.
>
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> # the Free Software Foundation; either version 2 of the License, or
> # (at your option) any later version.
> #
> # This program is distributed in the hope that it will be useful,
> # but WITHOUT ANY WARRANTY; without even the implied warranty of
> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> # GNU General Public License for more details.
> #
> # You should have received a copy of the GNU General Public License
> # along with this program; if not, write to the Free Software
> # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
>
> # interp.exp Test interpreter-exec command
>
> if $tracelevel then {
> strace $tracelevel
> }
>
> gdb_start
>
> gdb_test "interpreter-exec mi \"-var-update *\"\n" "\\^done,changelist=[].*"
> gdb_test "interpreter-exec console \"show version\"\n" "GNU gdb .*"
>
> gdb_exit
>
More information about the Gdb-patches
mailing list