From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8012 invoked by alias); 20 Nov 2001 19:10:36 -0000 Mailing-List: contact gdb-patches-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 7973 invoked from network); 20 Nov 2001 19:10:29 -0000 Received: from unknown (HELO draco.cus.cam.ac.uk) (131.111.8.18) by sourceware.cygnus.com with SMTP; 20 Nov 2001 19:10:29 -0000 Received: from bjh21 (helo=localhost) by draco.cus.cam.ac.uk with local-esmtp (Exim 3.951 #4) id 166FQO-0005Qs-00 for gdb-patches@sources.redhat.com; Tue, 20 Nov 2001 18:15:12 +0000 Date: Thu, 08 Nov 2001 09:52:00 -0000 From: Ben Harris To: Subject: [RFA] Fix stack backtraces on 26-bit ARM Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2001-11/txt/msg00156.txt.bz2 I've got an assignment signed, and commit access, so can someone approve this now? I'm trying to make GDB 5.0 work on NetBSD/arm26. One problem I've run into is that even with "set apcs32 0", stack backtraces include flags in the program counter for all frames apart from the top one. I think this patch fixes the problem by using arm_addr_bits_remove() to clean up the PC fetched from a stack frame. I'm not in a position to check this still works on arm32 and thumb. ChangeLog entry: 2001-11-20 Ben Harris * arm-tdep.c (arm_frame_saved_pc): Use arm_addr_bits_remove to clean the PC. Necessary for backtraces in 26-bit modes. Patch: *** arm-tdep.c 2000/07/26 00:32:33 1.1.1.1 --- arm-tdep.c 2001/10/20 16:40:16 *************** arm_frame_saved_pc (struct frame_info *f *** 1019,1025 **** #endif { CORE_ADDR pc = arm_find_callers_reg (fi, LR_REGNUM); ! return IS_THUMB_ADDR (pc) ? UNMAKE_THUMB_ADDR (pc) : pc; } } --- 1021,1027 ---- #endif { CORE_ADDR pc = arm_find_callers_reg (fi, LR_REGNUM); ! return arm_addr_bits_remove(pc); } } -- Ben Harris Portmaster, NetBSD/arm26