diff options
author | Andrew Stubbs <andrew.stubbs@st.com> | 2008-05-02 13:58:38 +0000 |
---|---|---|
committer | Andrew Stubbs <andrew.stubbs@st.com> | 2008-05-02 13:58:38 +0000 |
commit | d01a8610c32e2e361b3b9f0f43c0011f84558371 (patch) | |
tree | 920d9f3fd8ab886b07856d34093ce717e04568fb /gdb | |
parent | 5009afc5ba7a0d57f28fbc834757145fe1f45549 (diff) | |
download | binutils-gdb-d01a8610c32e2e361b3b9f0f43c0011f84558371.tar.gz |
2008-05-02 Andrew Stubbs <andrew.stubbs@st.com>
* main.h (batch_silent): Declare.
* event-top.c: Include main.h.
(gdb_setup_readline): Remove extern batch_silent declaration.
* infrun.c (normal_stop): Don't print source location when running in
--batch-silent mode.
* Makefile.in (event-top.o): Add main.h dependency.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/Makefile.in | 2 | ||||
-rw-r--r-- | gdb/event-top.c | 3 | ||||
-rw-r--r-- | gdb/infrun.c | 5 | ||||
-rw-r--r-- | gdb/main.h | 1 |
5 files changed, 16 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8b51c3b23e1..753d35041c2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,12 @@ +2008-05-02 Andrew Stubbs <andrew.stubbs@st.com> + + * main.h (batch_silent): Declare. + * event-top.c: Include main.h. + (gdb_setup_readline): Remove extern batch_silent declaration. + * infrun.c (normal_stop): Don't print source location when running in + --batch-silent mode. + * Makefile.in (event-top.o): Add main.h dependency. + 2008-05-02 Andreas Schwab <schwab@suse.de> * target.h (struct target_ops): Add diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 2000a0a8cb3..c7a3124cc39 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -2110,7 +2110,7 @@ event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \ event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \ $(terminal_h) $(event_loop_h) $(event_top_h) $(interps_h) \ $(exceptions_h) $(cli_script_h) $(gdbcmd_h) $(readline_h) \ - $(readline_history_h) + $(readline_history_h) $(main_h) exceptions.o: exceptions.c $(defs_h) $(exceptions_h) $(breakpoint_h) \ $(target_h) $(inferior_h) $(annotate_h) $(ui_out_h) $(gdb_assert_h) \ $(gdb_string_h) $(serial_h) diff --git a/gdb/event-top.c b/gdb/event-top.c index 839e1114665..e8e9f68bb9a 100644 --- a/gdb/event-top.c +++ b/gdb/event-top.c @@ -31,6 +31,7 @@ #include <signal.h> #include "exceptions.h" #include "cli/cli-script.h" /* for reset_command_nest_depth */ +#include "main.h" /* For dont_repeat() */ #include "gdbcmd.h" @@ -1084,8 +1085,6 @@ gdb_setup_readline (void) that the sync setup is ALL done in gdb_init, and we would only mess it up here. The sync stuff should really go away over time. */ - extern int batch_silent; - if (!batch_silent) gdb_stdout = stdio_fileopen (stdout); gdb_stderr = stdio_fileopen (stderr); diff --git a/gdb/infrun.c b/gdb/infrun.c index 16a802bb068..582cb51b910 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -3171,7 +3171,10 @@ Further execution is probably impossible.\n")); bpstat_print() contains the logic deciding in detail what to print, based on the event(s) that just occurred. */ - if (stop_print_frame) + /* If --batch-silent is enabled then there's no need to print the current + source location, and to try risks causing an error message about + missing source files. */ + if (stop_print_frame && !batch_silent) { int bpstat_ret; int source_flag; diff --git a/gdb/main.h b/gdb/main.h index d5135753027..0c97837024c 100644 --- a/gdb/main.h +++ b/gdb/main.h @@ -33,5 +33,6 @@ extern int gdb_main (struct captured_main_args *); /* From main.c. */ extern int return_child_result; extern int return_child_result_value; +extern int batch_silent; #endif |