OSDN Git Service

2002-03-06 Martin M. Hunt <hunt@redhat.com>
authorhunt <hunt>
Thu, 7 Mar 2002 20:22:40 +0000 (20:22 +0000)
committerhunt <hunt>
Thu, 7 Mar 2002 20:22:40 +0000 (20:22 +0000)
* 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.

gdb/gdbtk/ChangeLog
gdb/gdbtk/library/interface.tcl
gdb/gdbtk/library/srctextwin.itb

index b28e2d7..b13a8f1 100644 (file)
@@ -1,5 +1,16 @@
 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.
 
index b457ffb..2d879b9 100644 (file)
@@ -512,7 +512,7 @@ proc gdbtk_tcl_trace_find_hook {arg from_tty} {
 # ------------------------------------------------------------------
 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
@@ -524,7 +524,7 @@ proc gdb_run_readline_command {command args} {
 # ------------------------------------------------------------------
 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
@@ -535,7 +535,7 @@ proc gdb_run_readline_command_no_output {command args} {
 # ------------------------------------------------------------------
 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
@@ -547,12 +547,12 @@ proc gdbtk_tcl_readline_begin {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.
@@ -573,10 +573,9 @@ proc gdbtk_tcl_readline {prompt} {
 # ------------------------------------------------------------------
 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)}
 }
 
 # ------------------------------------------------------------------
index 4b16949..7588955 100644 (file)
@@ -2310,27 +2310,39 @@ body SrcTextWin::showBPBalloon {win x y} {
   }
 
   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