From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30266 invoked by alias); 24 Nov 2002 15:57:13 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 30257 invoked from network); 24 Nov 2002 15:57:06 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 24 Nov 2002 15:57:06 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 8BFD13E4B for ; Sun, 24 Nov 2002 10:56:58 -0500 (EST) Message-ID: <3DE0F6CA.8010403@redhat.com> Date: Sun, 24 Nov 2002 07:57:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: gdb-patches@sources.redhat.com Subject: Re: [commit, oops] New function pc_in_dummy_frame(pc) References: <3DE0EFE8.2090803@redhat.com> Content-Type: multipart/mixed; boundary="------------020506090409040106010009" X-SW-Source: 2002-11/txt/msg00586.txt.bz2 This is a multi-part message in MIME format. --------------020506090409040106010009 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 623 > There is a problem though (and I only noticed after committing it :-(). > > The change assumes that all architectures that use generic dummy frames also set PC_IN_CALL_DUMMY to generic_pc_in_call_dummy() (and hence eventually call this new pc_in_dummy_frame). Problem is, some don't: > cris, frv, i386, x86-64 > They instead use pc_in_call_dummy_at_entry_point(). Now, in theory, generic_pc_in_call_dummy() and pc_in_call_dummy_at_entry_point() are equivalent, I'm not going to put money on it though. Hence, expect a follow up patch to revert a small part of this change. I've checked in the attached. Andrew --------------020506090409040106010009 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 2294 2002-11-24 Andrew Cagney * frame.c (set_unwind_by_pc): Revert change below, use PC_IN_CALL_DUMMY. (get_prev_frame): Ditto. Index: frame.c =================================================================== RCS file: /cvs/src/src/gdb/frame.c,v retrieving revision 1.30 diff -u -r1.30 frame.c --- frame.c 24 Nov 2002 15:06:08 -0000 1.30 +++ frame.c 24 Nov 2002 15:39:20 -0000 @@ -656,7 +656,11 @@ *unwind_register = frame_saved_regs_register_unwind; *unwind_pc = frame_saved_regs_pc_unwind; } - else if (pc_in_dummy_frame (pc)) + /* FIXME: cagney/2002-11-24: Can't yet directly call + pc_in_dummy_frame() as some architectures don't set + PC_IN_CALL_DUMMY() to generic_pc_in_call_dummy() (remember the + latter is implemented by simply calling pc_in_dummy_frame). */ + else if (PC_IN_CALL_DUMMY (pc, 0, 0)) { *unwind_register = dummy_frame_register_unwind; *unwind_pc = dummy_frame_pc_unwind; @@ -694,7 +698,11 @@ has previously set it. This is really somewhat bogus. The initialization, as seen in create_new_frame(), should occur before the INIT function has been called. */ - if (USE_GENERIC_DUMMY_FRAMES && pc_in_dummy_frame (pc)) + /* FIXME: cagney/2002-11-24: Can't yet directly call + pc_in_dummy_frame() as some architectures don't set + PC_IN_CALL_DUMMY() to generic_pc_in_call_dummy() (remember the + latter is implemented by simply calling pc_in_dummy_frame). */ + if (USE_GENERIC_DUMMY_FRAMES && PC_IN_CALL_DUMMY (pc, 0, 0)) /* NOTE: cagney/2002-11-11: Does this even occure? */ type = DUMMY_FRAME; else @@ -975,8 +983,11 @@ has previously set it. This is really somewhat bogus. The initialization, as seen in create_new_frame(), should occur before the INIT function has been called. */ - if (USE_GENERIC_DUMMY_FRAMES - && pc_in_dummy_frame (prev->pc)) + /* FIXME: cagney/2002-11-24: Can't yet directly call + pc_in_dummy_frame() as some architectures don't set + PC_IN_CALL_DUMMY() to generic_pc_in_call_dummy() (remember the + latter is implemented by simply calling pc_in_dummy_frame). */ + if (USE_GENERIC_DUMMY_FRAMES && PC_IN_CALL_DUMMY (prev->pc, 0, 0)) prev->type = DUMMY_FRAME; else { --------------020506090409040106010009--