aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Stubbs <andrew.stubbs@st.com>2005-11-07 15:27:07 +0000
committerAndrew Stubbs <andrew.stubbs@st.com>2005-11-07 15:27:07 +0000
commitf17517ea066bd25def1a2800d327ba126730d16d (patch)
tree82880100363b3e720df40a40bbe8a231d66c7ff7 /gdb
parenteef57022010a5f6c7483c31607696fe1482b781e (diff)
downloadgdb-f17517ea066bd25def1a2800d327ba126730d16d.zip
gdb-f17517ea066bd25def1a2800d327ba126730d16d.tar.gz
gdb-f17517ea066bd25def1a2800d327ba126730d16d.tar.bz2
2005-11-07 Andrew Stubbs <andrew.stubbs@st.com>
* main.h (return_child_result, return_child_result_value): Declare. * infrun.c: Include main.h. (print_stop_reason): Remove declaration of return_child_result_value. * top.c: Include main.h. (quit_force): Remove declarations of return_child_result_value and return_child_result. * Makefile.in (top.o, infrun.o): Add main.h to dependencies.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/Makefile.in4
-rw-r--r--gdb/infrun.c8
-rw-r--r--gdb/main.h4
-rw-r--r--gdb/top.c2
5 files changed, 20 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5213ec9..5446a2a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
2005-11-07 Andrew Stubbs <andrew.stubbs@st.com>
+ * main.h (return_child_result, return_child_result_value): Declare.
+ * infrun.c: Include main.h.
+ (print_stop_reason): Remove declaration of return_child_result_value.
+ * top.c: Include main.h.
+ (quit_force): Remove declarations of return_child_result_value and
+ return_child_result.
+ * Makefile.in (top.o, infrun.o): Add main.h to dependencies.
+
+2005-11-07 Andrew Stubbs <andrew.stubbs@st.com>
+
* Makefile.in (tui-winsource.o): Add gdb_assert.h to dependencies.
2005-11-07 Andrew Stubbs <andrew.stubbs@st.com>
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 73eb906..64c6b22 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2133,7 +2133,7 @@ infrun.o: infrun.c $(defs_h) $(gdb_string_h) $(symtab_h) $(frame_h) \
$(gdbcore_h) $(gdbcmd_h) $(cli_script_h) $(target_h) $(gdbthread_h) \
$(annotate_h) $(symfile_h) $(top_h) $(inf_loop_h) $(regcache_h) \
$(value_h) $(observer_h) $(language_h) $(solib_h) $(gdb_assert_h) \
- $(mi_common_h)
+ $(mi_common_h) $(main_h)
inftarg.o: inftarg.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
$(gdbcore_h) $(command_h) $(gdb_stat_h) $(observer_h) $(gdb_wait_h) \
$(inflow_h)
@@ -2689,7 +2689,7 @@ top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \
$(annotate_h) $(completer_h) $(top_h) $(version_h) $(serial_h) \
$(doublest_h) $(gdb_assert_h) $(readline_h) $(readline_history_h) \
$(event_top_h) $(gdb_string_h) $(gdb_stat_h) $(ui_out_h) \
- $(cli_out_h)
+ $(cli_out_h) $(main_h)
tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \
$(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \
$(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \
diff --git a/gdb/infrun.c b/gdb/infrun.c
index f1ebc3e..fab0a96 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -46,6 +46,7 @@
#include "observer.h"
#include "language.h"
#include "solib.h"
+#include "main.h"
#include "gdb_assert.h"
#include "mi/mi-common.h"
@@ -2931,11 +2932,8 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info)
async_reason_lookup (EXEC_ASYNC_EXITED_NORMALLY));
ui_out_text (uiout, "\nProgram exited normally.\n");
}
- {
- /* Support the --return-child-result option. */
- extern int return_child_result_value;
- return_child_result_value = stop_info;
- }
+ /* Support the --return-child-result option. */
+ return_child_result_value = stop_info;
break;
case SIGNAL_RECEIVED:
/* Signal received. The signal table tells us to print about
diff --git a/gdb/main.h b/gdb/main.h
index 1c91d07..2f5e90c 100644
--- a/gdb/main.h
+++ b/gdb/main.h
@@ -32,4 +32,8 @@ struct captured_main_args
extern int gdb_main (struct captured_main_args *);
+/* From main.c. */
+extern int return_child_result;
+extern int return_child_result_value;
+
#endif
diff --git a/gdb/top.c b/gdb/top.c
index a8bba83..e4fb845 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -46,6 +46,7 @@
#include "serial.h"
#include "doublest.h"
#include "gdb_assert.h"
+#include "main.h"
/* readline include files */
#include "readline/readline.h"
@@ -1177,7 +1178,6 @@ quit_force (char *args, int from_tty)
{
int exit_code = 0;
struct qt_args qt;
- extern int return_child_result, return_child_result_value;
/* An optional expression may be used to cause gdb to terminate with the
value of that expression. */