From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8393 invoked by alias); 22 May 2002 01:41:06 -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 8386 invoked from network); 22 May 2002 01:41:05 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 22 May 2002 01:41:05 -0000 Received: from reddwarf.sfbay.redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id SAA20367; Tue, 21 May 2002 18:40:59 -0700 (PDT) Received: (from msnyder@localhost) by reddwarf.sfbay.redhat.com (8.11.2/8.11.2) id g4M1Qsg03294; Tue, 21 May 2002 18:26:54 -0700 Date: Tue, 21 May 2002 18:45:00 -0000 From: Michael Snyder Message-Id: <200205220126.g4M1Qsg03294@reddwarf.sfbay.redhat.com> To: gdb-patches@sources.redhat.com Subject: [RFA] Arm/Thumb tweak for generic_dummy_frames Cc: rearnsha@arm.com X-SW-Source: 2002-05/txt/msg00844.txt.bz2 Richard, This is a corner case that Andrew missed when he did the transition to generic dummy frames. 2002-05-21 Michael Snyder * arm-tdep.c (arm_frame_chain): Recognize dummy-frame as a special case that does not indicate a transition from arm to thumb or vice versa. Index: arm-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/arm-tdep.c,v retrieving revision 1.62 diff -p -r1.62 arm-tdep.c *** arm-tdep.c 21 May 2002 15:36:02 -0000 1.62 --- arm-tdep.c 22 May 2002 01:38:08 -0000 *************** arm_frame_chain (struct frame_info *fi) *** 1039,1062 **** struct frame_info caller_fi; struct cleanup *old_chain; ! /* Create a temporary frame suitable for scanning the caller's ! prologue. (Ugh.) */ ! memset (&caller_fi, 0, sizeof (caller_fi)); ! caller_fi.extra_info = (struct frame_extra_info *) ! xcalloc (1, sizeof (struct frame_extra_info)); ! old_chain = make_cleanup (xfree, caller_fi.extra_info); ! caller_fi.saved_regs = (CORE_ADDR *) ! xcalloc (1, SIZEOF_FRAME_SAVED_REGS); ! make_cleanup (xfree, caller_fi.saved_regs); ! /* Now, scan the prologue and obtain the frame register. */ ! caller_fi.pc = caller_pc; ! arm_scan_prologue (&caller_fi); ! framereg = caller_fi.extra_info->framereg; ! /* Deallocate the storage associated with the temporary frame ! created above. */ ! do_cleanups (old_chain); } /* If the caller used a frame register, return its value. --- 1039,1066 ---- struct frame_info caller_fi; struct cleanup *old_chain; ! if (!(USE_GENERIC_DUMMY_FRAMES ! && PC_IN_CALL_DUMMY (caller_pc, 0, 0))) ! { ! /* Create a temporary frame suitable for scanning the caller's ! prologue. (Ugh.) */ ! memset (&caller_fi, 0, sizeof (caller_fi)); ! caller_fi.extra_info = (struct frame_extra_info *) ! xcalloc (1, sizeof (struct frame_extra_info)); ! old_chain = make_cleanup (xfree, caller_fi.extra_info); ! caller_fi.saved_regs = (CORE_ADDR *) ! xcalloc (1, SIZEOF_FRAME_SAVED_REGS); ! make_cleanup (xfree, caller_fi.saved_regs); ! /* Now, scan the prologue and obtain the frame register. */ ! caller_fi.pc = caller_pc; ! arm_scan_prologue (&caller_fi); ! framereg = caller_fi.extra_info->framereg; ! /* Deallocate the storage associated with the temporary frame ! created above. */ ! do_cleanups (old_chain); ! } } /* If the caller used a frame register, return its value.