]>
Commit | Line | Data |
---|---|---|
3a58abaf AM |
1 | 2005-02-14 Jeff Johnston <jjohnstn@redhat.com> |
2 | ||
3 | * top.c (gdb_readline_wrapper): Ensure terminal is gdb's before calling | |
4 | readline. | |
5 | ||
6 | 2007-10-14 Jan Kratochvil <jan.kratochvil@redhat.com> | |
7 | ||
8 | Port to GDB-6.7. | |
9 | ||
10 | Index: gdb-6.7/gdb/top.c | |
11 | =================================================================== | |
12 | --- gdb-6.7.orig/gdb/top.c 2007-09-02 23:13:56.000000000 +0200 | |
13 | +++ gdb-6.7/gdb/top.c 2007-10-14 23:38:27.000000000 +0200 | |
14 | @@ -795,6 +795,14 @@ gdb_readline_wrapper (char *prompt) | |
15 | ||
16 | back_to = make_cleanup (gdb_readline_wrapper_cleanup, cleanup); | |
17 | ||
18 | + /* Before calling readline, ensure we have the terminal. If we don't | |
19 | + have the terminal and call readline, we risk the possibility of | |
20 | + gdb being thrown into the background. This problem occurs when | |
21 | + we attach to a background process on the same terminal the background | |
22 | + process was started from and then perform some action which requires | |
23 | + a page break prompt. */ | |
24 | + terminal_ours (); | |
25 | + | |
26 | /* Display our prompt and prevent double prompt display. */ | |
27 | display_gdb_prompt (prompt); | |
28 | rl_already_prompted = 1; |