From: Eli Zaretskii <eliz@elta.co.il>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFC: Centralize DECR_PC_AFTER_BREAK handling from infrun
Date: Sun, 18 Jan 2004 07:05:00 -0000 [thread overview]
Message-ID: <uy8s5ka50.fsf@elta.co.il> (raw)
In-Reply-To: <20040117222007.GA23563@nevyn.them.org> (message from Daniel Jacobowitz on Sat, 17 Jan 2004 17:20:07 -0500)
> Date: Sat, 17 Jan 2004 17:20:07 -0500
> From: Daniel Jacobowitz <drow@mvista.com>
>
> One case, HANDLE_NONSTEPPABLE_WATCHPOINTS and DECR_PC_AFTER_BREAK, is simply
> removed. There are no targets using this combination, and if one is added,
> it's non-obvious whether a nonsteppable watchpoint really should be affected
> by DECR_PC_AFTER_BREAK.
Right, but since we don't really know what that feature was about, I'd
suggest to leave a comment in adjust_pc_after_break that mentions
HANDLE_NONSTEPPABLE_WATCHPOINTS and that its support, if needed,
should be added.
> * breakpoint.c (software_breakpoint_inserted_here_p): New function.
> (bpstat_stop_status): Don't decrement PC.
> * breakpoint.h (software_breakpoint_inserted_here_p): Add
> prototype.
> * infrun.c (adjust_pc_after_break): New function.
> (handle_inferior_event): Call it, early. Remove later references
> to DECR_PC_AFTER_BREAK.
> (normal_stop): Add commentary.
What happens if a location has both software and hardware
breakpoints? Does the code still DTRT?
> + /* If we've hit a breakpoint, we'll be stopped with SIGTRAP. */
> + if (ecs->ws.kind != TARGET_WAITKIND_STOPPED)
> + return;
> +
> + if (ecs->ws.value.sig != TARGET_SIGNAL_TRAP)
> + return;
The original code didn't check these conditions, right? So why add
them here? (Also, the comment doesn't seem to describe the two
tests, only the second one.)
next prev parent reply other threads:[~2004-01-18 7:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-17 22:20 Daniel Jacobowitz
2004-01-17 22:39 ` Andrew Cagney
2004-01-17 23:04 ` Daniel Jacobowitz
2004-01-18 7:05 ` Eli Zaretskii [this message]
2004-01-18 15:19 ` Daniel Jacobowitz
2004-01-18 17:27 ` Eli Zaretskii
2004-01-18 18:01 ` Andrew Cagney
2004-01-18 19:08 ` Eli Zaretskii
2004-01-31 17:51 ` Daniel Jacobowitz
2004-01-31 17:49 ` Daniel Jacobowitz
2004-01-22 14:09 ` Andrew Cagney
2004-01-22 22:34 ` Daniel Jacobowitz
2004-01-31 19:19 ` Daniel Jacobowitz
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=uy8s5ka50.fsf@elta.co.il \
--to=eliz@elta.co.il \
--cc=drow@mvista.com \
--cc=gdb-patches@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