On Thursday 04 January 2007 02:13, Daniel Jacobowitz wrote: > On Wed, Dec 20, 2006 at 02:17:30PM +0300, Vladimir Prus wrote: > > I've converted one of MI tests to use this mechanism and found that > > the result is much more clear than it was. There are problems -- > > namely that the syntax of the special comments looks weird and that > > Emacs does not highlight them as Tcl. But I think those I minor > > glitches and the new way is overall better? > > > > OK? > > No one commented, and overall I think it's a good idea. I'll approve > the patch if you'll fix one thing for me... > > > + if {$first==1} { > > + # Start the program afresh. > > + set line_now [mi_run_to_line "$mi_autotest_source:$line"\ > > + "exec-run"] > > + set first 0 > > + } elseif {$line_now!=$line} { > > + set line_now [mi_run_to_line "$mi_autotest_source:$line"\ > > + "exec-continue"] > > + } > > Instead of using exec-run, can you arrange to use mi_runto, or at least > mi_run_cmd? You can't "run" a remote target, e.g. gdbserver or > foo-elf. Revised patch, and a delta, are attached. Is it better? - Volodya * lib/mi-support.exp (mi_autotest_data): New variable. (mi_autotest_source): New variable. (count_newlines, mi_prepare_inline_tests) (mi_get_inline_test, mi_run_to_line) (mi_run_inline_test, mi_tbreak) (mi_send_resuming_command, mi_wait_for_stop): New functions. * gdb.mi/mi-var-cp.exp: Move most content to the C file. Run inline tests. * gdb.mi/mi-var-cp.cc: Define tests here.