Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: drow@mvista.com, gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fix watchpoints when stepping over a breakpoint
Date: Sun, 14 Apr 2002 14:49:00 -0000	[thread overview]
Message-ID: <3CB9F964.4010409@cygnus.com> (raw)
In-Reply-To: <7263-Sun07Apr2002195334+0300-eliz@is.elta.co.il>

> Date: Sun, 07 Apr 2002 12:16:22 -0400
>> From: Andrew Cagney <ac131313@cygnus.com>
>> 
>> What would it take to replace DECR_PC_AFTER_BREAK with a read_pc() 
>> function that determines the stop address from the i386 hardware 
>> registers and other state information?

Tried it (yes i386).  It is more complicated (suprise) than I thought. 
As far as I can tell, the i386 backend can't locally differentiate 
between a single step trap or a breakpoint trap.  Instead it needs to 
refer to GDB's internal state to figure out what it was probably trying 
to do.

> How would that help to solve this specific problem?  The original
> problem happened on i386 as well, right?  So at best, you'd be pushing
> the ``rat's nest'' from GDB application level to x86-specific parts of
> GDB, where there still will be need to decide what kind of breakpoint
> to reports to the application level.
> 
> Or am I missing something?
> 
> In general, it strikes me that breakpoint.c's design goes against what
> you propose: it defines an API where GDB queries the target about the
> status of all the known break/watchpoints, and then decides what
> happened based on what the target reports.  You seem to suggest a
> different strategy: let the target tell GDB what happened.  While
> certainly a viable idea, it sounds like a major redesign of a central
> GDB facility, no?

No that would remain.  I'm just looking at the read_pc() / 
DECR_PC_AFTER_BREAK pair.  In bpstat_stop_status(), for instance, there 
is a call to get_current_frame() that creates a frame with the wrong PC 
value :-(

Andrew


  reply	other threads:[~2002-04-14 21:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-02 15:43 Daniel Jacobowitz
2002-04-04 23:38 ` Eli Zaretskii
2002-04-05  7:54   ` Daniel Jacobowitz
2002-04-05  8:45     ` Eli Zaretskii
2002-04-05  9:08       ` Daniel Jacobowitz
2002-04-05  9:55         ` Andrew Cagney
2002-04-05 23:48         ` Eli Zaretskii
2002-04-06  7:36           ` Daniel Jacobowitz
2002-04-06  9:21             ` Eli Zaretskii
2002-04-06  9:49               ` Daniel Jacobowitz
2002-04-07  9:16                 ` Andrew Cagney
2002-04-07 10:03                   ` Eli Zaretskii
2002-04-14 14:49                     ` Andrew Cagney [this message]
2002-04-14 22:07                       ` Eli Zaretskii
2002-04-18 18:34                         ` Andrew Cagney
2002-04-02 22:18 Michael Elizabeth Chastain

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=3CB9F964.4010409@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=drow@mvista.com \
    --cc=eliz@is.elta.co.il \
    --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