From: Andrew STUBBS <andrew.stubbs@st.com>
To: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Prevent source file errors in --batch-silent mode
Date: Fri, 02 May 2008 14:03:00 -0000 [thread overview]
Message-ID: <481B1E6F.7090408@st.com> (raw)
In-Reply-To: <20080502134418.GC29202@caradoc.them.org>
[-- Attachment #1: Type: text/plain, Size: 219 bytes --]
Daniel Jacobowitz wrote:
> OK, if you also update Makefile.in(event-top.o).
Thanks, I've attached the version committed.
I think I've been spoilt by makefiles that generate the dependencies
automatically. :)
Andrew
[-- Attachment #2: batch-silent-interrupt.patch --]
[-- Type: text/plain, Size: 2907 bytes --]
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.
Index: src2/gdb/infrun.c
===================================================================
--- src2.orig/gdb/infrun.c 2008-05-02 10:34:13.000000000 +0100
+++ src2/gdb/infrun.c 2008-05-02 11:26:06.000000000 +0100
@@ -3171,7 +3171,10 @@ Further execution is probably impossible
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;
Index: src2/gdb/event-top.c
===================================================================
--- src2.orig/gdb/event-top.c 2008-03-14 19:55:51.000000000 +0000
+++ src2/gdb/event-top.c 2008-05-02 11:24:30.000000000 +0100
@@ -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);
Index: src2/gdb/main.h
===================================================================
--- src2.orig/gdb/main.h 2008-01-01 22:53:12.000000000 +0000
+++ src2/gdb/main.h 2008-05-02 14:52:31.000000000 +0100
@@ -33,5 +33,6 @@ extern int gdb_main (struct captured_mai
/* From main.c. */
extern int return_child_result;
extern int return_child_result_value;
+extern int batch_silent;
#endif
Index: src2/gdb/Makefile.in
===================================================================
--- src2.orig/gdb/Makefile.in 2008-05-02 10:32:53.000000000 +0100
+++ src2/gdb/Makefile.in 2008-05-02 14:51:38.000000000 +0100
@@ -2110,7 +2110,7 @@ event-loop.o: event-loop.c $(defs_h) $(e
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)
next prev parent reply other threads:[~2008-05-02 14:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-21 19:34 Andrew STUBBS
2008-04-28 19:02 ` Andrew STUBBS
2008-05-01 20:34 ` Daniel Jacobowitz
2008-05-02 11:35 ` Andrew STUBBS
2008-05-02 13:46 ` Daniel Jacobowitz
2008-05-02 14:03 ` Andrew STUBBS [this message]
2008-05-02 14:10 ` Daniel Jacobowitz
2008-05-03 6:23 ` Thiago Jung Bauermann
2008-05-03 14:26 ` Christopher Faylor
2008-05-03 20:56 ` Thiago Jung Bauermann
2008-05-03 15:33 ` Daniel Jacobowitz
2008-05-03 20:54 ` Thiago Jung Bauermann
2008-05-03 21:48 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=481B1E6F.7090408@st.com \
--to=andrew.stubbs@st.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox