- Fix readline history for input mode commands like `command' (BZ 215816).
- Related: rhbz#215816
This commit is contained in:
parent
67e6bd43b5
commit
ba921cd95b
42
gdb-6.5-bz215816-readline-from-callback.patch
Normal file
42
gdb-6.5-bz215816-readline-from-callback.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=215816
|
||||||
|
|
||||||
|
|
||||||
|
Index: ./readline/readline.c
|
||||||
|
===================================================================
|
||||||
|
RCS file: /cvs/src/src/readline/readline.c,v
|
||||||
|
retrieving revision 1.10
|
||||||
|
diff -u -p -r1.10 readline.c
|
||||||
|
--- ./readline/readline.c 5 May 2006 18:26:12 -0000 1.10
|
||||||
|
+++ ./readline/readline.c 22 Nov 2006 19:40:17 -0000
|
||||||
|
@@ -295,6 +295,7 @@ readline (prompt)
|
||||||
|
const char *prompt;
|
||||||
|
{
|
||||||
|
char *value;
|
||||||
|
+ int in_callback;
|
||||||
|
|
||||||
|
/* If we are at EOF return a NULL string. */
|
||||||
|
if (rl_pending_input == EOF)
|
||||||
|
@@ -303,6 +304,13 @@ readline (prompt)
|
||||||
|
return ((char *)NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* When we call readline, we have to make sure that readline isn't in
|
||||||
|
+ the callback state. Otherwise, it will get really confused.
|
||||||
|
+ PR gdb tui/2173. */
|
||||||
|
+ in_callback = RL_ISSTATE (RL_STATE_CALLBACK);
|
||||||
|
+ if (in_callback)
|
||||||
|
+ RL_UNSETSTATE (RL_STATE_CALLBACK);
|
||||||
|
+
|
||||||
|
rl_set_prompt (prompt);
|
||||||
|
|
||||||
|
rl_initialize ();
|
||||||
|
@@ -321,6 +329,9 @@ readline (prompt)
|
||||||
|
rl_clear_signals ();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+ if (in_callback)
|
||||||
|
+ RL_SETSTATE (RL_STATE_CALLBACK);
|
||||||
|
+
|
||||||
|
return (value);
|
||||||
|
}
|
||||||
|
|
9
gdb.spec
9
gdb.spec
@ -11,7 +11,7 @@ Name: gdb
|
|||||||
Version: 6.5
|
Version: 6.5
|
||||||
|
|
||||||
# The release always contains a leading reserved number, start it at 0.
|
# The release always contains a leading reserved number, start it at 0.
|
||||||
Release: 17%{?dist}
|
Release: 18%{?dist}
|
||||||
|
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Development/Debuggers
|
Group: Development/Debuggers
|
||||||
@ -301,6 +301,9 @@ Patch208: gdb-6.5-BEA-testsuite.patch
|
|||||||
# Fix readline segfault on excessively long hand-typed lines.
|
# Fix readline segfault on excessively long hand-typed lines.
|
||||||
Patch209: gdb-6.5-readline-long-line-crash.patch
|
Patch209: gdb-6.5-readline-long-line-crash.patch
|
||||||
|
|
||||||
|
# Fix readline history for input mode commands like `command' (BZ 215816).
|
||||||
|
Patch212: gdb-6.5-bz215816-readline-from-callback.patch
|
||||||
|
|
||||||
BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext
|
BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext
|
||||||
BuildRequires: flex bison sharutils
|
BuildRequires: flex bison sharutils
|
||||||
|
|
||||||
@ -420,6 +423,7 @@ and printing their data.
|
|||||||
%patch208 -p1
|
%patch208 -p1
|
||||||
%patch209 -p1
|
%patch209 -p1
|
||||||
%patch211 -p1
|
%patch211 -p1
|
||||||
|
%patch212 -p1
|
||||||
|
|
||||||
# Change the version that gets printed at GDB startup, so it is RedHat
|
# Change the version that gets printed at GDB startup, so it is RedHat
|
||||||
# specific.
|
# specific.
|
||||||
@ -582,6 +586,9 @@ fi
|
|||||||
# don't include the files in include, they are part of binutils
|
# don't include the files in include, they are part of binutils
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Nov 25 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-18
|
||||||
|
- Fix readline history for input mode commands like `command' (BZ 215816).
|
||||||
|
|
||||||
* Wed Nov 16 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-17
|
* Wed Nov 16 2006 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.5-17
|
||||||
- Bugfix testcase typo of gdb-6.5-16.
|
- Bugfix testcase typo of gdb-6.5-16.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user