902c8e5abc
- Import TUI regression fix (Pedro Alves, BZ 1123003).
156 lines
6.8 KiB
Diff
156 lines
6.8 KiB
Diff
http://sourceware.org/ml/gdb-patches/2014-07/msg00274.html
|
|
Subject: [obv] Fix false argv0-symlink.exp FAIL running under a very long directory name
|
|
|
|
Hi,
|
|
|
|
checked in as obvious:
|
|
|
|
Starting program: /home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff/gdb/testsuite/gdb.base/argv0-symlink-filelink ^M
|
|
[...]
|
|
(gdb) print argv[0]^M
|
|
$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-", 'f' <repeats 169 times>...^M
|
|
(gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name
|
|
|
|
after "set print repeats 10000":
|
|
|
|
print argv[0]^M
|
|
$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"...^M
|
|
(gdb) FAIL: gdb.base/argv0-symlink.exp: kept file symbolic link name
|
|
|
|
after "set print elements 10000":
|
|
|
|
print argv[0]^M
|
|
$1 = 0x7fffffffda39 "/home/jkratoch/redhat/gdb-test-fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff/gdb/testsuite/gdb.base/argv0-symlink-filelink"^M
|
|
(gdb) PASS: gdb.base/argv0-symlink.exp: kept file symbolic link name
|
|
|
|
commit 218c2655603748b844dcaf103e34fd14d8ee8aef
|
|
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
Date: Fri Jul 11 17:26:42 2014 +0200
|
|
|
|
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
|
|
index 74f7bce..253eeeb 100644
|
|
### a/gdb/testsuite/ChangeLog
|
|
### b/gdb/testsuite/ChangeLog
|
|
## -1,3 +1,9 @@
|
|
+2014-07-11 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
+
|
|
+ Fix false FAIL running under a very long directory name.
|
|
+ * gdb.base/argv0-symlink.exp: Add "set print repeats 10000"
|
|
+ and "set print elements 10000". Twice.
|
|
+
|
|
2014-07-11 Yao Qi <yao@codesourcery.com>
|
|
|
|
* gdb.base/exprs.exp: "set print symbol off".
|
|
diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp
|
|
index 0e0202d..d849b4c 100644
|
|
--- a/gdb/testsuite/gdb.base/argv0-symlink.exp
|
|
+++ b/gdb/testsuite/gdb.base/argv0-symlink.exp
|
|
@@ -36,6 +36,9 @@ if ![runto_main] {
|
|
return -1
|
|
}
|
|
|
|
+gdb_test_no_output "set print repeats 10000"
|
|
+gdb_test_no_output "set print elements 10000"
|
|
+
|
|
gdb_test {print argv[0]} "/$filelink\"" $test
|
|
|
|
# For a link named /PATH/TO/DIR/LINK, we want to check the output
|
|
@@ -67,6 +70,9 @@ if ![runto_main] {
|
|
return -1
|
|
}
|
|
|
|
+gdb_test_no_output "set print repeats 10000"
|
|
+gdb_test_no_output "set print elements 10000"
|
|
+
|
|
# gdbserver does not have this issue.
|
|
if ![is_remote target] {
|
|
setup_kfail "*-*-*" gdb/15934
|
|
|
|
|
|
|
|
commit c46269f24eccce534b3cababbf47c6b6b290ed03
|
|
Author: Pedro Alves <palves@redhat.com>
|
|
Date: Thu Jul 24 16:00:37 2014 +0100
|
|
|
|
Fix pagination crash when the TUI is active
|
|
|
|
The TUI currently crashes when the user types <return> in response to
|
|
a pagination prompt:
|
|
|
|
$ gdb --tui ...
|
|
*the TUI is now active*
|
|
(gdb) set height 2
|
|
(gdb) help
|
|
List of classes of commands:
|
|
|
|
Program received signal SIGSEGV, Segmentation fault.
|
|
strlen () at ../sysdeps/x86_64/strlen.S:106
|
|
106 movdqu (%rax), %xmm12
|
|
|
|
(top-gdb) bt
|
|
#0 strlen () at ../sysdeps/x86_64/strlen.S:106
|
|
#1 0x000000000086be5f in xstrdup (s=0x0) at ../src/libiberty/xstrdup.c:33
|
|
#2 0x00000000005163f9 in tui_prep_terminal (notused1=1) at ../src/gdb/tui/tui-io.c:296
|
|
#3 0x000000000077a7ee in _rl_callback_newline () at ../src/readline/callback.c:82
|
|
#4 0x000000000077a853 in rl_callback_handler_install (prompt=0x0, linefunc=0x618b60 <command_line_handler>) at ../src/readline/callback.c:102
|
|
#5 0x0000000000718a5c in gdb_readline_wrapper_cleanup (arg=0xfd14d0) at ../src/gdb/top.c:788
|
|
#6 0x0000000000596d08 in do_my_cleanups (pmy_chain=0xcf0b38 <cleanup_chain>, old_chain=0x1043d10) at ../src/gdb/cleanups.c:155
|
|
#7 0x0000000000596d75 in do_cleanups (old_chain=0x1043d10) at ../src/gdb/cleanups.c:177
|
|
#8 0x0000000000718bd9 in gdb_readline_wrapper (prompt=0x7fffffffcfa0 "---Type <return> to continue, or q <return> to quit---")
|
|
at ../src/gdb/top.c:835
|
|
#9 0x000000000071cf74 in prompt_for_continue () at ../src/gdb/utils.c:1894
|
|
#10 0x000000000071d434 in fputs_maybe_filtered (linebuffer=0x1043db0 "List of classes of commands:\n\n", stream=0xf72e20, filter=1)
|
|
at ../src/gdb/utils.c:2111
|
|
#11 0x000000000071da0f in vfprintf_maybe_filtered (stream=0xf72e20, format=0x89aef8 "List of classes of %scommands:\n\n", args=0x7fffffffd118, filter=1)
|
|
at ../src/gdb/utils.c:2339
|
|
#12 0x000000000071da4a in vfprintf_filtered (stream=0xf72e20, format=0x89aef8 "List of classes of %scommands:\n\n", args=0x7fffffffd118)
|
|
at ../src/gdb/utils.c:2347
|
|
#13 0x000000000071dc72 in fprintf_filtered (stream=0xf72e20, format=0x89aef8 "List of classes of %scommands:\n\n") at ../src/gdb/utils.c:2399
|
|
#14 0x00000000004f90ab in help_list (list=0xe6d100, cmdtype=0x89ad8c "", class=all_classes, stream=0xf72e20)
|
|
at ../src/gdb/cli/cli-decode.c:1038
|
|
#15 0x00000000004f8dba in help_cmd (arg=0x0, stream=0xf72e20) at ../src/gdb/cli/cli-decode.c:946
|
|
|
|
Git 0017922 added:
|
|
|
|
@@ -776,6 +777,12 @@ gdb_readline_wrapper_cleanup (void *arg)
|
|
|
|
gdb_assert (input_handler == gdb_readline_wrapper_line);
|
|
input_handler = cleanup->handler_orig;
|
|
+
|
|
+ /* Reinstall INPUT_HANDLER in readline, without displaying a
|
|
+ prompt. */
|
|
+ if (async_command_editing_p)
|
|
+ rl_callback_handler_install (NULL, input_handler);
|
|
|
|
and tui_prep_terminal simply misses handling the case of a NULL
|
|
rl_prompt.
|
|
|
|
I also checked that readline's sources do similar checks.
|
|
|
|
gdb/
|
|
2014-07-24 Pedro Alves <palves@redhat.com>
|
|
|
|
* tui/tui-io.c (tui_prep_terminal): Handle NULL rl_prompt.
|
|
|
|
### a/gdb/ChangeLog
|
|
### b/gdb/ChangeLog
|
|
## -1,3 +1,7 @@
|
|
+2014-07-24 Pedro Alves <palves@redhat.com>
|
|
+
|
|
+ * tui/tui-io.c (tui_prep_terminal): Handle NULL rl_prompt.
|
|
+
|
|
2014-07-22 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
* stack.c (read_frame_arg): Verify value_optimized_out before calling
|
|
--- a/gdb/tui/tui-io.c
|
|
+++ b/gdb/tui/tui-io.c
|
|
@@ -293,7 +293,7 @@ tui_prep_terminal (int notused1)
|
|
(we can't use gdb_prompt() due to secondary prompts and can't use
|
|
rl_prompt because it points to an alloca buffer). */
|
|
xfree (tui_rl_saved_prompt);
|
|
- tui_rl_saved_prompt = xstrdup (rl_prompt);
|
|
+ tui_rl_saved_prompt = rl_prompt != NULL ? xstrdup (rl_prompt) : NULL;
|
|
}
|
|
|
|
/* Readline callback to restore the terminal. It is called once each
|