From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14274 invoked by alias); 14 Apr 2002 03:21:14 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 14251 invoked from network); 14 Apr 2002 03:21:13 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 14 Apr 2002 03:21:13 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id BAFE03CCA; Sat, 13 Apr 2002 23:21:19 -0400 (EDT) Message-ID: <3CB8F5AF.9060302@cygnus.com> Date: Sat, 13 Apr 2002 20:21:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020328 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Snyder , Kevin Buettner Cc: gdb@sources.redhat.com Subject: Re: [rfc] ``pc'' -> resume_addr? References: <3CB5F437.30607@cygnus.com> <1020411205831.ZM3555@localhost.localdomain> <3CB60B21.10407@cygnus.com> <3CB628D0.8DC57F22@redhat.com> <3CB70459.2010405@cygnus.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00238.txt.bz2 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