diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/gdbtk/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/gdbtk/library/interface.tcl | 20 | ||||
-rw-r--r-- | gdb/gdbtk/library/session.tcl | 3 |
3 files changed, 31 insertions, 3 deletions
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog index 5e8f43de2db..df03f0f6322 100644 --- a/gdb/gdbtk/ChangeLog +++ b/gdb/gdbtk/ChangeLog @@ -1,3 +1,14 @@ +2001-10-06 Tom Tromey <tromey@redhat.com> + + * library/session.tcl (SESSION_recreate_bps): Use + gdb_run_readline_command_no_output to recreate breakpoints. + * library/interface.tcl (gdb_run_readline_command): Set + readlineShowUser element of gdbtk_state. + (gdb_run_readline_command_no_output): New proc. + (initialize_gdbtk): Initialize readlineShowUser element. + (gdbtk_tcl_readline_begin): Use readlineShowUser element. + (gdbtk_tcl_readline): Likewise. + 2001-10-05 Keith Seitz <keiths@redhat.com> * generic/gdbtk-bp.c (get_breakpoint_commands): New function. diff --git a/gdb/gdbtk/library/interface.tcl b/gdb/gdbtk/library/interface.tcl index 8b41b8b8e80..7dea4056534 100644 --- a/gdb/gdbtk/library/interface.tcl +++ b/gdb/gdbtk/library/interface.tcl @@ -509,6 +509,19 @@ proc gdb_run_readline_command {command args} { global gdbtk_state # debug "$command $args" set gdbtk_state(readlineArgs) $args + set gdbtk_state(readlineShowUser) 1 + gdb_cmd $command +} + +# ------------------------------------------------------------------ +# PROC: gdb_run_readline_command_no_output +# Run a readline command, but don't show the commands to the user. +# ------------------------------------------------------------------ +proc gdb_run_readline_command_no_output {command args} { + global gdbtk_state +# debug "$command $args" + set gdbtk_state(readlineArgs) $args + set gdbtk_state(readlineShowUser) 0 gdb_cmd $command } @@ -519,7 +532,7 @@ proc gdbtk_tcl_readline_begin {message} { global gdbtk_state # debug "readline begin" set gdbtk_state(readline) 0 - if {$gdbtk_state(console) != ""} { + if {$gdbtk_state(console) != "" && $gdbtk_state(readlineShowUser)} { $gdbtk_state(console) insert $message } } @@ -533,7 +546,9 @@ proc gdbtk_tcl_readline {prompt} { if {[info exists gdbtk_state(readlineArgs)]} { # Not interactive, so pop the list, and print element. set cmd [lvarpop gdbtk_state(readlineArgs)] - command::insert_command $cmd + if {$gdbtk_state(readlineShowUser)} { + command::insert_command $cmd + } } else { # Interactive. # debug "interactive" @@ -1718,6 +1733,7 @@ proc initialize_gdbtk {} { # Only do this once... set gdbtk_state(readline) 0 set gdbtk_state(console) "" + set gdbtk_state(readlineShowUser) 1 } # check for existence of a kod command and get it's name and diff --git a/gdb/gdbtk/library/session.tcl b/gdb/gdbtk/library/session.tcl index 4c477708798..d7a2bbefe5d 100644 --- a/gdb/gdbtk/library/session.tcl +++ b/gdb/gdbtk/library/session.tcl @@ -91,7 +91,8 @@ proc SESSION_recreate_bps {specs} { if {[llength $commands]} { lappend commands end - gdb_cmd "commands \$bpnum\n[join $commands \n]" + eval gdb_run_readline_command_no_output [list "commands \$bpnum"] \ + $commands } } } |