Refactor reading of commands
authorVladimir Prus <vladimir@codesourcery.com>
Mon, 3 Aug 2009 12:26:37 +0000 (12:26 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Mon, 3 Aug 2009 12:26:37 +0000 (12:26 +0000)
commit3c1179ff511933179e64e854ac7b39c8003d9868
treef373d634eb477f3cfa4e49e198be1409bfef75b3
parenta877a2b69dc03c6e3cbc75def32d3ceb31594f16
Refactor reading of commands

* defs.h (read_command_lines_1): Declare.
* cli/cli-script.c (read_next_line): Only return string,
do not process.
(process_next_line): New, extracted from read_next_line.
(recurse_read_control_structure): Take a function pointer to the
read function.
(get_command_line) Pass the read_next_line as reader function
into recurse_read_control_structure.
(read_command_lines_1): New, extracted from...
(read_command_lines): ...here.
gdb/ChangeLog
gdb/cli/cli-script.c
gdb/defs.h
gdb/testsuite/gdb.mi/mi-var-cmd.exp