From: Tom Tromey <tom@tromey.com>
To: Tom Tromey <tom@tromey.com>
Cc: Pedro Alves <palves@redhat.com>,
Philippe Waroquiers <philippe.waroquiers@skynet.be>,
gdb-patches@sourceware.org
Subject: Re: [RFA 1/2] Fix regressions for multi breakpoints command line setting/clearing
Date: Wed, 15 Aug 2018 18:24:00 -0000 [thread overview]
Message-ID: <8736vfa3pp.fsf@tromey.com> (raw)
In-Reply-To: <877eksajdp.fsf@tromey.com> (Tom Tromey's message of "Tue, 14 Aug 2018 12:33:06 -0600")
Tom> I will test a new (much smaller) patch a bit later.
This is hilariously simpler and seems to fix the problem.
Let me know what you think.
Tom
commit 06b655186f44cf3cf9f0c9419427a65f6b32cb5c
Author: Tom Tromey <tom@tromey.com>
Date: Wed Aug 15 08:25:49 2018 -0600
Do not allow command repetition from read_next_line
Pedro pointed out that the commands being read by "commands" should
not be repeatable. This patch fixes that problem, and the
use-after-free bug, by simply modifying read_next_line to disallow
repetition.
Tested by the buildbot.
gdb/ChangeLog
2018-08-15 Tom Tromey <tom@tromey.com>
* cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
command_line_input.
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9fac8ccf5f4..1e5f5a8e30d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-08-15 Tom Tromey <tom@tromey.com>
+
+ * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
+ command_line_input.
+
2018-08-15 Tom Tromey <tom@tromey.com>
* aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 6f31a400197..d03b3bcf60b 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -903,7 +903,7 @@ read_next_line (void)
else
prompt_ptr = NULL;
- return command_line_input (prompt_ptr, from_tty, "commands");
+ return command_line_input (prompt_ptr, 0, "commands");
}
/* Return true if CMD's name is NAME. */
next prev parent reply other threads:[~2018-08-15 18:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-02 21:26 RFA " Philippe Waroquiers
2018-08-02 21:26 ` [RFA 2/2] Modify gdb.base/commands.exp to test multi breakpoint command setting/clearing Philippe Waroquiers
2018-08-16 15:54 ` Pedro Alves
2018-08-02 21:26 ` [RFA 1/2] Fix regressions for multi breakpoints command line setting/clearing Philippe Waroquiers
2018-08-03 18:29 ` Tom Tromey
2018-08-09 4:57 ` Tom Tromey
2018-08-09 20:20 ` Philippe Waroquiers
2018-08-10 0:35 ` Tom Tromey
2018-08-10 3:05 ` Tom Tromey
2018-08-10 3:13 ` Tom Tromey
2018-08-10 16:07 ` Tom Tromey
2018-08-11 20:38 ` Tom Tromey
2018-08-13 21:32 ` Philippe Waroquiers
2018-08-14 15:02 ` Pedro Alves
2018-08-14 18:33 ` Tom Tromey
2018-08-15 18:24 ` Tom Tromey [this message]
2018-08-16 15:34 ` Pedro Alves
2018-08-17 23:12 ` Tom Tromey
2018-08-21 18:01 ` Tom Tromey
2018-08-25 19:17 ` Philippe Waroquiers
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=8736vfa3pp.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=philippe.waroquiers@skynet.be \
/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