public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: "Martin M. Hunt" <hunt@redhat.com>
Cc: Insight Mailing List <insight@sources.redhat.com>
Subject: Re: [RFA] fix session breakpoints
Date: Wed, 02 Jan 2002 18:14:00 -0000	[thread overview]
Message-ID: <Pine.GSO.4.33.0201021810480.3400-100000@makita.cygnus.com> (raw)
In-Reply-To: <200201022042.MAA24030@cygnus.com>

On Wed, 2 Jan 2002, Martin M. Hunt wrote:

> 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.

While I agree with Tom that it would be nice to fix this for real, I also
acknowledge that there are for more people using sessions to do
init-script like things than those using gdb's init files.

What we really want is something in breakpoint.c to tell us if the
breakpoint was set from an init script. Somehow I doubt we'd get it.

Please add a comment about our failure to deal with this generically, but
for now, we might as well make developers' lives easier. Then commit.

Thanks,
Keith

> 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" {
>

  parent reply	other threads:[~2002-01-03  2:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-02 12:42 Martin M. Hunt
2002-01-02 12:46 ` Tom Tromey
2002-01-02 12:48 ` Ian Roxborough
2002-01-02 18:14 ` Keith Seitz [this message]
2002-01-03 13:44   ` Martin M. Hunt
  -- strict thread matches above, loose matches on Subject: below --
2001-10-13 11:41 Martin M. Hunt
2001-12-17 14:49 ` Martin M. Hunt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.GSO.4.33.0201021810480.3400-100000@makita.cygnus.com \
    --to=keiths@redhat.com \
    --cc=hunt@redhat.com \
    --cc=insight@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).