From owner-svn-src-all@FreeBSD.ORG Mon Nov 17 16:37:04 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61CA5106564A; Mon, 17 Nov 2008 16:37:04 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EF918FC19; Mon, 17 Nov 2008 16:37:04 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mAHGb4hg087547; Mon, 17 Nov 2008 16:37:04 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mAHGb4gd087546; Mon, 17 Nov 2008 16:37:04 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200811171637.mAHGb4gd087546@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 17 Nov 2008 16:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185024 - head/contrib/gdb/gdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2008 16:37:04 -0000 Author: raj Date: Mon Nov 17 16:37:04 2008 New Revision: 185024 URL: http://svn.freebsd.org/changeset/base/185024 Log: gdb: Remove arm_pc_is_thumb_dummy() and related code. This is basically an import of the following gdb change: http://sourceware.org/ml/gdb-cvs/2005-03/msg00143.html (which in effect fixes problems with gracefully closing down the non-Thumb program being debugged). Modified: head/contrib/gdb/gdb/arm-tdep.c Modified: head/contrib/gdb/gdb/arm-tdep.c ============================================================================== --- head/contrib/gdb/gdb/arm-tdep.c Mon Nov 17 16:32:57 2008 (r185023) +++ head/contrib/gdb/gdb/arm-tdep.c Mon Nov 17 16:37:04 2008 (r185024) @@ -181,20 +181,6 @@ struct arm_prologue_cache int arm_apcs_32 = 1; -/* Flag set by arm_fix_call_dummy that tells whether the target - function is a Thumb function. This flag is checked by - arm_push_arguments. FIXME: Change the PUSH_ARGUMENTS macro (and - its use in valops.c) to pass the function address as an additional - parameter. */ - -static int target_is_thumb; - -/* Flag set by arm_fix_call_dummy that tells whether the calling - function is a Thumb function. This flag is checked by - arm_pc_is_thumb and arm_call_dummy_breakpoint_offset. */ - -static int caller_is_thumb; - /* Determine if the program counter specified in MEMADDR is in a Thumb function. */ @@ -219,27 +205,6 @@ arm_pc_is_thumb (CORE_ADDR memaddr) } } -/* Determine if the program counter specified in MEMADDR is in a call - dummy being called from a Thumb function. */ - -int -arm_pc_is_thumb_dummy (CORE_ADDR memaddr) -{ - CORE_ADDR sp = read_sp (); - - /* FIXME: Until we switch for the new call dummy macros, this heuristic - is the best we can do. We are trying to determine if the pc is on - the stack, which (hopefully) will only happen in a call dummy. - We hope the current stack pointer is not so far alway from the dummy - frame location (true if we have not pushed large data structures or - gone too many levels deep) and that our 1024 is not enough to consider - code regions as part of the stack (true for most practical purposes). */ - if (DEPRECATED_PC_IN_CALL_DUMMY (memaddr, sp, sp + 1024)) - return caller_is_thumb; - else - return 0; -} - /* Remove useless bits from addresses in a running program. */ static CORE_ADDR arm_addr_bits_remove (CORE_ADDR val) @@ -2021,7 +1986,7 @@ arm_breakpoint_from_pc (CORE_ADDR *pcptr { struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); - if (arm_pc_is_thumb (*pcptr) || arm_pc_is_thumb_dummy (*pcptr)) + if (arm_pc_is_thumb (*pcptr)) { *pcptr = UNMAKE_THUMB_ADDR (*pcptr); *lenptr = tdep->thumb_breakpoint_size;