2002-03-06 Martin M. Hunt <hunt@redhat.com>
+ * library/srctextwin.itb (SrcTextWin::showBPBalloon):
+ Reformat output. Add conditions, ignore count, commands.
+
+ * library/interface.tcl (gdbtk_tcl_readline): Remove
+ call to "command::insert" and instead insert the command
+ into the console window.
+ (gdbtk_tcl_readline_end): Catch the unsets and do not call
+ non-existent function command::end_multi_line_input.
+
+2002-03-06 Martin M. Hunt <hunt@redhat.com>
+
* library/bpwin.itb: Left-justify the labels in
the table.
# ------------------------------------------------------------------
proc gdb_run_readline_command {command args} {
global gdbtk_state
-# debug "$command $args"
+ debug "$command $args"
set gdbtk_state(readlineArgs) $args
set gdbtk_state(readlineShowUser) 1
gdb_cmd $command
# ------------------------------------------------------------------
proc gdb_run_readline_command_no_output {command args} {
global gdbtk_state
-# debug "$command $args"
+ debug "$command $args"
set gdbtk_state(readlineArgs) $args
set gdbtk_state(readlineShowUser) 0
gdb_cmd $command
# ------------------------------------------------------------------
proc gdbtk_tcl_readline_begin {message} {
global gdbtk_state
-# debug "readline begin"
+# debug
set gdbtk_state(readline) 0
if {$gdbtk_state(console) != "" && $gdbtk_state(readlineShowUser)} {
$gdbtk_state(console) insert $message
# ------------------------------------------------------------------
proc gdbtk_tcl_readline {prompt} {
global gdbtk_state
-# debug "$prompt"
+# debug "prompt=$prompt"
if {[info exists gdbtk_state(readlineArgs)]} {
# Not interactive, so pop the list, and print element.
set cmd [lvarpop gdbtk_state(readlineArgs)]
- if {$gdbtk_state(readlineShowUser)} {
- command::insert_command $cmd
+ if {$gdbtk_state(console) != "" && $gdbtk_state(readlineShowUser)} {
+ $gdbtk_state(console) insert $cmd
}
} else {
# Interactive.
# ------------------------------------------------------------------
proc gdbtk_tcl_readline_end {} {
global gdbtk_state
-# debug "readline_end"
+# debug
catch {unset gdbtk_state(readlineArgs)}
- unset gdbtk_state(readlineActive)
- command::end_multi_line_input
+ catch {unset gdbtk_state(readlineActive)}
}
# ------------------------------------------------------------------
}
set str ""
- set need_lf 0
foreach b $bps {
set bpinfo [gdb_get_breakpoint_info $b]
lassign $bpinfo file func linenum addr type enabled disposition \
ignore_count commands cond thread hit_count user_specification
- if {$thread == "-1"} {set thread "all"}
set file [lindex [file split $file] end]
if {$enabled} {
set enabled "ENA"
} else {
set enabled "DIS"
}
- if {$cond == ""} {set cond "none"}
- if {$need_lf} {
- append str \n
- } else {
- set need_lf 1
+
+ append str [format "breakpoint %d at %s:%d (%#x)\n %s %s %s" \
+ $b $file $linenum $addr $enabled $type $disposition]
+
+ if {$thread != "-1"} {
+ append str "\n threads: $thread"
+ }
+
+ if {$ignore_count != 0} {
+ append str "\n ignore: $ignore_count"
+ }
+
+ if {$cond != ""} {
+ append str "\n condition: $cond"
+ }
+
+ if {$commands != ""} {
+ if {[string length $commands] > 50} {
+ append str "\n commands: [string range $commands 0 50] ..."
+ } else {
+ append str "\n commands: $commands"
+ }
}
- append str [format "breakpoint %d at %s:%d (%#x)\n\t%s %s %s %s %s" \
- $b $file $linenum $addr $enabled $type $disposition \
- threads=$thread cond=$cond]
}
# Scope out which break type is set here, and use the tag to get