This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Fix PR 14392
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sun, 5 Aug 2012 21:47:59 +0200
- Subject: Re: Fix PR 14392
- References: <87wr1kyq4s.fsf@fleche.redhat.com>
On Tue, 31 Jul 2012 16:14:11 +0200, Tom Tromey wrote:
> I could not reproduce the crash in the PR, so no test case.
It crashes reliably for me (Fedora 18 x86_64, -lmcheck, FSF GDB HEAD):
#0 0x000000000062af74 in filter_sals (sals=0x7fff57f45520) at ./cli/cli-cmds.c:1519
#1 0x0000000000629bc5 in list_command (arg=0x1fd0415 ",5", from_tty=1) at ./cli/cli-cmds.c:962
#2 0x000000000062246a in do_cfunc (c=0x2324ce0, args=0x1fd0415 ",5", from_tty=1) at ./cli/cli-decode.c:67
I find the patch OK.
Thanks,
Jan
gdb/testsuite/
2012-08-05 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.base/list.exp (test_only_end): New function.
Call it.
diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp
index 16d25d2..6b5b207 100644
--- a/gdb/testsuite/gdb.base/list.exp
+++ b/gdb/testsuite/gdb.base/list.exp
@@ -505,6 +505,12 @@ proc test_forward_search {} {
verbose "Timeout is now $timeout seconds" 2
}
+proc test_only_end {} {
+ gdb_test_no_output "set listsize 2"
+ gdb_test "list 1" "list 1\r\n1\[ \t\]\[^\r\n\]*\r\n2\[ \t\]\[^\r\n\]*"
+ gdb_test "list ,5" "list ,5\r\n4\[ \t\]\[^\r\n\]*\r\n5\[ \t\]\[^\r\n\]*"
+}
+
# Start with a fresh gdb.
gdb_exit
@@ -526,6 +532,7 @@ if [ set_listsize 10 ] then {
test_list_range
test_list_filename_and_function
test_forward_search
+ test_only_end
}
remote_exec build "rm -f list0.h"