diff options
author | Fred Fish <fnf@specifix.com> | 1996-05-20 02:05:55 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1996-05-20 02:05:55 +0000 |
commit | 41756e56ee00510ee7044119d0b033ea536dae5b (patch) | |
tree | a13dd46e358db51665d1904037254fc685ea66f1 /gdb/breakpoint.c | |
parent | 4242ac27a53b03d4cdd4f1da1887ee92fd39befa (diff) | |
download | gdb-41756e56ee00510ee7044119d0b033ea536dae5b.zip gdb-41756e56ee00510ee7044119d0b033ea536dae5b.tar.gz gdb-41756e56ee00510ee7044119d0b033ea536dae5b.tar.bz2 |
* defs.h (read_command_lines, query_hook): Update prototypes.
(readline_begin_hook, readline_hook, readline_end_hook): Declare.
* breakpoint.c (commands_command): Build message in temporary buffer
and pass that, as well as tty control flag, to read_command_lines.
* top.c (readline_begin_hook, readline_hook, readline_end_hook):
Define here.
(command_loop): Check for non-NULL instream before looping.
(command_line_input): Use readline_hook when appropriate, to get
user input from a GUI window.
(read_next_line): Also build prompt if getting user input from a GUI.
(recurse_read_control_structure): Fix typo in comment.
(read_command_lines): Use passed in prompt and tty flag to decide how
to build message. Use readline_begin_hook when appropriate, to set
up a GUI interaction window. Just return head, whether NULL or not,
after using readline_end_hook to complete GUI interaction.
(define_command, document_command): Build message in a temporary
buffer and pass it to read_command_lines, along with tty flag.
* gdbtk.c (gdbtk_readline_begin, gdbtk_readline, gdbtk_readline_end):
New functions.
(tk_command_loop): Set instream to NULL to enable Tk user interaction.
(gdbtk_init): Set readline_begin_hook, readline_hook,
and readline_end_hook.
* gdbtk.tcl (gdbtk_tcl_readline_begin, gdbtk_tcl_readline,
gdbtk_tcl_readline_end): New functions.
(tclsh): Pack scroll bar on right side of window, not left.
PR 9385
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 54c01b6..2356288 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -330,10 +330,9 @@ commands_command (arg, from_tty) ALL_BREAKPOINTS (b) if (b->number == bnum) { - if (from_tty && input_from_terminal_p ()) - printf_filtered ("Type commands for when breakpoint %d is hit, one per line.\n\ -End with a line saying just \"end\".\n", bnum); - l = read_command_lines (); + char tmpbuf[128]; + sprintf (tmpbuf, "Type commands for when breakpoint %d is hit, one per line.", bnum); + l = read_command_lines (tmpbuf, from_tty); free_command_lines (&b->commands); b->commands = l; breakpoints_changed (); |