From: Andrew Cagney <ac131313@ges.redhat.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch/ob] not_a_breakpoint -> not_a_sw_breakpoint
Date: Fri, 16 Aug 2002 12:34:00 -0000 [thread overview]
Message-ID: <3D5D53AF.1000908@ges.redhat.com> (raw)
In-Reply-To: <1020816185159.ZM30848@localhost.localdomain>
>> The variable is used vis:
>>
>> bpstat_stop_status (CORE_ADDR *pc, int not_a_sw_breakpoint)
>> {
>> [...]
>> /* Get the address where the breakpoint would have been. The
>> "not_a_sw_breakpoint" argument is meant to distinguish between a
>> breakpoint trap event and a trace/singlestep trap event. For a
>> trace/singlestep trap event, we would not want to subtract
>> DECR_PC_AFTER_BREAK from the PC. */
>>
>> bp_addr = *pc - (not_a_sw_breakpoint && !SOFTWARE_SINGLE_STEP_P () ?
>> 0 : DECR_PC_AFTER_BREAK);
>>
>>
>> Later in the code appears:
>>
>> if (DECR_PC_AFTER_HW_BREAK != 0)
>> {
>> *pc = *pc - DECR_PC_AFTER_HW_BREAK;
>> write_pc (*pc);
>> }
>>
>> if not_a_sw_breakpoint applied to hardware breakpoints then the above
>> decrement would be guarded by not_a_sw_breakpoint.
>>
>> BTW, an even more correct name is ``not_a_sw_breakpoint_trap''.
>> However, Joel might end up adding something better than that.
>
>
> Your reasoning is sound so long as we assume that the code
> that you're basing your reasoning on isn't bitrotted. (I only see
> one target with a non-zero DECR_PC_AFTER_HW_BREAK, and I'll bet that
> hasn't been tested in a while.)
I think that is separate. The ``intent'' of the variable is to indicate
that what is being looked at isn't a trap due to a software breakpoint
event.
> What I'd like to be convinced of is that the conditions which are
> used to instantiate ``not_a_sw_breakpoint'' really imply that that
> we could be stopped due to a hardware watchpoint, but not a software
> breakpoint trap.
>
> The conditions in question are:
>
> currently_stepping (ecs) && prev_pc != stop_pc - DECR_PC_AFTER_BREAK
Yes, see my e-mail to Joel. I'm asking that a separate explict
``trap_from_software_singlestep'' be ||ed into those equations. While
the rest might be pretty bogus (the above is just an heuristic really)
at least that flag will be correct :-)
Andrew
next prev parent reply other threads:[~2002-08-16 19:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-16 8:37 Andrew Cagney
2002-08-16 8:49 ` Daniel Jacobowitz
2002-08-16 10:34 ` Andrew Cagney
2002-08-16 10:38 ` Daniel Jacobowitz
2002-08-16 10:43 ` Andrew Cagney
2002-08-16 10:47 ` Daniel Jacobowitz
2002-08-16 10:53 ` Andrew Cagney
2002-08-16 10:56 ` Daniel Jacobowitz
2002-08-16 11:04 ` Andrew Cagney
2002-08-16 9:43 ` Kevin Buettner
2002-08-16 10:34 ` Andrew Cagney
2002-08-16 11:52 ` Kevin Buettner
2002-08-16 12:34 ` Andrew Cagney [this message]
2002-08-16 13:12 ` Kevin Buettner
2002-08-16 13:34 ` Andrew Cagney
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=3D5D53AF.1000908@ges.redhat.com \
--to=ac131313@ges.redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kevinb@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