Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Michael Snyder <msnyder@redhat.com>, Kevin Buettner <kevinb@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: [rfc] ``pc'' -> resume_addr?
Date: Sat, 13 Apr 2002 20:21:00 -0000	[thread overview]
Message-ID: <3CB8F5AF.9060302@cygnus.com> (raw)
In-Reply-To: <3CB70459.2010405@cygnus.com>

It gets better ...

> Ok, I think I've figured out how this ``works'':
> 
> - target stops
> 
> - infrun has an initial look round.  If it doesn't think the read_pc() value is interesting, it resumes the target.  Thing is, I can't detect any write_pc() for this case - as best as I can tell it resumes the target without adjusting the PC.

Add:
- in looking around, it might create a frame (for PC_IN_CALL_DUMMY()) 
and that frame's PC won't have been adjusted.

> - Otherwise infrun calls bpstat_stop_status() and that will eventually call:
>     write_pc(read_pc()-decr);
> and patch up that PC value. Ulgh!

> - finally the block/frame is created.   This calls read_pc() and gets the ``fixed'' pc.

Add:
- since the frame (with a botched PC) may have previously been created, 
the top level frame->pc needs to be patched:

   /* Make sure that the current_frame's pc is correct.  This
      is a correction for setting up the frame info before doing
      DECR_PC_AFTER_BREAK */
   if (target_has_execution && get_current_frame ())
     (get_current_frame ())->pc = read_pc ();

:-)

Andrew


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

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-11 13:38 Andrew Cagney
2002-04-11 13:58 ` Kevin Buettner
2002-04-11 15:15   ` Andrew Cagney
2002-04-11 16:35     ` Andrew Cagney
2002-04-11 16:48       ` Kevin Buettner
2002-04-11 17:08         ` Andrew Cagney
2002-04-11 17:37       ` Michael Snyder
2002-04-11 16:42     ` Kevin Buettner
2002-04-11 17:39       ` Michael Snyder
2002-04-11 17:34     ` Michael Snyder
2002-04-12  8:59       ` Andrew Cagney
2002-04-13 20:21         ` Andrew Cagney [this message]
2002-04-11 17:25 ` Michael Snyder
2002-04-26  8:09 ` 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=3CB8F5AF.9060302@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb@sources.redhat.com \
    --cc=kevinb@redhat.com \
    --cc=msnyder@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