aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorAndrew Stubbs <andrew.stubbs@st.com>2006-07-21 14:46:56 +0000
committerAndrew Stubbs <andrew.stubbs@st.com>2006-07-21 14:46:56 +0000
commit16026cd75d6c4515b5c854a7b4726678bb6ec31f (patch)
tree9f8ddfb74128d1425aef25f5cf5dcf29747a4347 /gdb/main.c
parent3e4cf9243a5580b9b7766d6da9f0d5257705bf2a (diff)
downloadbinutils-16026cd75d6c4515b5c854a7b4726678bb6ec31f.zip
binutils-16026cd75d6c4515b5c854a7b4726678bb6ec31f.tar.gz
binutils-16026cd75d6c4515b5c854a7b4726678bb6ec31f.tar.bz2
2006-07-21 Andrew Stubbs <andrew.stubbs@st.com>
* cli/cli-cmds.c (source_verbose, trace_commands): New variables. (source_script): New function. (source_verbose_cleanup): New function. (source_command): Move old contents to source_script. Make function static. Parse -v option and call source_script. (init_cli_cmds): Update source command help. Add 'set trace-commands' command. * cli/cli-script.c (command_next_depth): New static variable. (suppress_next_print_command_trace): New static variable. (reset_command_nest_depth): New function. (print_command_trace): New function. (execute_control_command): Split the continue_control and break_control cases, add calls to print_command_trace and count the nest depth. (while_command): Set suppress_next_print_command_trace. (if_command): Likewise. * top.c (execute_command): Call print_command_trace. * cli/cli-cmds.h (source_verbose, trace_commands): New extern variables. (source_command): Change to source_script. * main.c (captued_main): Use source_script instead of source_command. * top.h (source_command): Change to source_script. * event-top.c (display_gdb_prompt): Call reset_command_nest_depth. * cli/cli-script.h (print_command_trace): Export. (reset_command_nest_depth): Likewise. docs/ * gdb.texinfo (Optional warnings and messages): Add 'set/show trace-commands'. (Command files): Add '-v' to source command. testsuite/ * gdb.base/default.exp: Update source command error message. * gdb.base/help.exp: Update 'help source' message.
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 8a11f17..b659972 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -643,7 +643,7 @@ extern int gdbtk_test (char *);
if (!inhibit_gdbinit)
{
- catch_command_errors (source_command, homeinit, 0, RETURN_MASK_ALL);
+ catch_command_errors (source_script, homeinit, 0, RETURN_MASK_ALL);
}
/* Do stats; no need to do them elsewhere since we'll only
@@ -730,7 +730,7 @@ extern int gdbtk_test (char *);
|| memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
if (!inhibit_gdbinit)
{
- catch_command_errors (source_command, gdbinit, 0, RETURN_MASK_ALL);
+ catch_command_errors (source_script, gdbinit, 0, RETURN_MASK_ALL);
}
for (i = 0; i < ncmd; i++)
@@ -748,12 +748,12 @@ extern int gdbtk_test (char *);
read_command_file (stdin);
else
#endif
- source_command (cmdarg[i], !batch);
+ source_script (cmdarg[i], !batch);
do_cleanups (ALL_CLEANUPS);
}
#endif
if (cmdarg[i].type == CMDARG_FILE)
- catch_command_errors (source_command, cmdarg[i].string,
+ catch_command_errors (source_script, cmdarg[i].string,
!batch, RETURN_MASK_ALL);
else /* cmdarg[i].type == CMDARG_COMMAND */
catch_command_errors (execute_command, cmdarg[i].string,