From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21823 invoked by alias); 2 Jan 2002 20:48:38 -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 21629 invoked from network); 2 Jan 2002 20:48:35 -0000 Date: Wed, 02 Jan 2002 12:48:00 -0000 From: Ian Roxborough To: "Martin M. Hunt" Cc: insight@sources.redhat.com Subject: Re: [RFA] fix session breakpoints Message-Id: <20020102124133.5a75ab3a.irox@redhat.com> In-Reply-To: <200201022042.MAA24030@cygnus.com> References: <200201022042.MAA24030@cygnus.com> Organization: Red Hat Inc. X-Mailer: Sylpheed version 0.6.5 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2002-q1/txt/msg00002.txt.bz2 Hi (happy '02) Just a thought, but maybe it would be better to assume that the executable name ends in "insight" or "gdb", so that "i386-elf-gdb" and others could be detected as well as just "gdb". Ian. On Wed, 2 Jan 2002 12:42:10 -0800 "Martin M. Hunt" wrote: > > On Monday 17 December 2001 02:47 pm, Martin M. Hunt wrote: > > I often use Insight to debug itself. After a few hundred times, things get > > a bit slow as Insight sets a few hundred breakpoints on info_command and > > internal_error. So here's a simple patch. It not only stops these > > breakpoints from accumulating but will also eliminate them from .gdbtkinit. > > This is a second version of the patch that attempts to check if you are > debugging gdb with itself before ignoring those breakpoints. It assumes the > name of the executable starts with "gdb" or "insight". Of course this isn't > ideal either, but anything else will require GDB changes and IMO will not be > worth the effort. > > -- > Martin Hunt > GDB Engineer > Red Hat, Inc. > > Index: session.tcl > =================================================================== > RCS file: /cvs/src/src/gdb/gdbtk/library/session.tcl,v > retrieving revision 1.9 > diff -u -r1.9 session.tcl > --- session.tcl 2001/10/28 20:08:39 1.9 > +++ session.tcl 2002/01/02 20:35:20 > @@ -33,11 +33,28 @@ > proc SESSION_serialize_bps {} { > set result {} > > + set basename [string tolower [file tail $::gdb_exe_name]] > + if {[string match "gdb*" $basename] > + || [string match "insight*" $basename]} { > + set debugging_gdb 1 > + } else { > + set debugging_gdb 0 > + } > + > foreach bp_num [gdb_get_breakpoint_list] { > lassign [gdb_get_breakpoint_info $bp_num] file function line_number \ > address type enabled disposition ignore_count command_list \ > condition thread hit_count user_specification > > + # These breakpoints are set when debugging GDB with itself. > + # Ignore them so they don't accumulate. They get set again > + # by .gdbinit anyway. > + if {$debugging_gdb} { > + if {$function == "internal_error" || $function == "info_command"} { > + continue > + } > + } > + > switch -glob -- $type { > "breakpoint" - > "hw breakpoint" {