Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] scope_breakpoint -> internal breakpoint
Date: Tue, 20 Aug 2002 12:55:00 -0000	[thread overview]
Message-ID: <3D629AB7.2ECE3374@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0208201122180.1421-100000@valrhona.uglyboxes.com>

Keith Seitz wrote:
> 
> Hi,
> 
> When a watchpoint is set on a local variable, GDB sets a breakpoint of
> type bp_watchpoint_scope to detect when the watchpoint is out of scope.
> 
> Right now, it does this using a "user-visible" breakpoint number (>0).
> This patch changes this so that this internal breakpoint is created as an
> internal breakpoint (<0). Section 5.1.2 of the user manual makes no
> mention of this breakpoint, so I am suggesting that we make it one of the
> optionally-displayed internal breakpoints.
> 
> I've run this through the testsuite and it introduces no new failures.
> 
> Keith

Good idea -- approved.

> 
> ChangeLog
> 2002-08-20  Keith Seitz  <keiths@redhat.com>
> 
>         * breakpoints.c (watch_command_1): Use internal breakpoint
>         when setting a watchpoint_scope breakpoint.
> 
> Patch
> Index: breakpoint.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/breakpoint.c,v
> retrieving revision 1.80
> diff -p -r1.80 breakpoint.c
> *** breakpoint.c        17 Aug 2002 06:12:52 -0000      1.80
> --- breakpoint.c        20 Aug 2002 18:19:42 -0000
> *************** watch_command_1 (char *arg, int accessfl
> *** 5331,5346 ****
>         if (prev_frame)
>         {
>           struct breakpoint *scope_breakpoint;
> !         struct symtab_and_line scope_sal;
> !
> !         INIT_SAL (&scope_sal);        /* initialize to zeroes */
> !         scope_sal.pc = get_frame_pc (prev_frame);
> !         scope_sal.section = find_pc_overlay (scope_sal.pc);
> !
> !         scope_breakpoint = set_raw_breakpoint (scope_sal,
> !                                                bp_watchpoint_scope);
> !         set_breakpoint_count (breakpoint_count + 1);
> !         scope_breakpoint->number = breakpoint_count;
> 
>           scope_breakpoint->enable_state = bp_enabled;
> 
> --- 5331,5338 ----
>         if (prev_frame)
>         {
>           struct breakpoint *scope_breakpoint;
> !         scope_breakpoint = create_internal_breakpoint (get_frame_pc (prev_frame),
> !                                                        bp_watchpoint_scope);
> 
>           scope_breakpoint->enable_state = bp_enabled;
>


  reply	other threads:[~2002-08-20 19:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-20 11:27 Keith Seitz
2002-08-20 12:55 ` Michael Snyder [this message]
2002-08-20 13:03   ` Keith Seitz

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=3D629AB7.2ECE3374@redhat.com \
    --to=msnyder@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=keiths@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