From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5749 invoked by alias); 7 Mar 2002 20:25:13 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 5661 invoked from network); 7 Mar 2002 20:25:10 -0000 Received: from unknown (HELO localhost.localdomain) (12.230.181.242) by sources.redhat.com with SMTP; 7 Mar 2002 20:25:10 -0000 Received: from there (DRAGON [127.0.0.1]) by localhost.localdomain (8.11.6/8.11.6) with SMTP id g27KOZc02133; Thu, 7 Mar 2002 12:24:35 -0800 Message-Id: <200203072024.g27KOZc02133@localhost.localdomain> Content-Type: text/plain; charset="iso-8859-1" From: "Martin M. Hunt" Organization: Red Hat Inc To: Keith Seitz Subject: Re: [RFA] breakpoint balloon info Date: Thu, 07 Mar 2002 12:25:00 -0000 X-Mailer: KMail [version 1.3.2] Cc: Insight Mailing List References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2002-q1/txt/msg00194.txt.bz2 On Thursday 07 March 2002 10:43 am, Keith Seitz wrote: > On Thu, 7 Mar 2002, Martin M. Hunt wrote: > > 2002-03-06 Martin M. Hunt > > > > * library/srctextwin.itb (SrcTextWin::showBPBalloon): > > Reformat output. Add conditions, ignore count, commands. > > Don't we need to be a little careful about commands? They could be huge... I adjusted the final patch to take this into account then checked it in. -- Martin Hunt GDB Engineer Red Hat, Inc. Index: library/srctextwin.itb =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/srctextwin.itb,v retrieving revision 1.32 diff -u -p -r1.32 srctextwin.itb --- srctextwin.itb 2002/03/05 22:22:20 1.32 +++ srctextwin.itb 2002/03/07 20:21:49 @@ -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