From patchwork Wed Mar 27 21:34:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 32022 Received: (qmail 99461 invoked by alias); 27 Mar 2019 21:34:59 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 98947 invoked by uid 89); 27 Mar 2019 21:34:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=unavailable version=3.3.1 spammy=leaves, HX-Received:600c X-HELO: mail-wm1-f66.google.com Received: from mail-wm1-f66.google.com (HELO mail-wm1-f66.google.com) (209.85.128.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Mar 2019 21:34:53 +0000 Received: by mail-wm1-f66.google.com with SMTP id y197so1680223wmd.0 for ; Wed, 27 Mar 2019 14:34:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=CCEgTzLyRGczrn3J0FlEnebYenPAk5wrLROtMhGEHRE=; b=efwyijSMPv6Xwy0h+CbZf/kJZfH1u52W48uFaTxtkDjhOWuw51Mc2UKzAkJadRfJ3X P/yIKnZpERosUkehU6yOoEIc/sVEDGKH95oRGvIsWgYPjST9Sf1CpmNtcayuavPUCTnS jJTuJgEllpwcoMmpcyKlY+KaVcbNDWR4gioth83vjnJwWtyCMAFPqHI1rIusxrf+hfP+ yP2a4tvjDGKMnEF2vO5XFrxM9JzVQdEVULy5VCtQb7wIZM74oOXyQmrKm9Yw0lyCJcrX 4+WiTBKIGM6Rq/3QyWGDECslNGLyPcsvTGAjKwti9uu3gtZY1YG8WsxXX4hU1fNetiby 655A== Return-Path: Received: from localhost (host81-151-161-58.range81-151.btcentralplus.com. [81.151.161.58]) by smtp.gmail.com with ESMTPSA id c8sm19285972wrx.6.2019.03.27.14.34.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2019 14:34:50 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: kevinb@redhat.com, macro@linux-mips.org, brobecker@adacore.com, green@moxielogic.com, qiyao@sourceware.org, shorne@gmail.com, Andrew Burgess Subject: [PATCH 13/25] gdb/or1k: Use default gdbarch methods where possible Date: Wed, 27 Mar 2019 21:34:09 +0000 Message-Id: <381d1981b991b2d2de32cd5178f1b2202bc49f5a.1553721876.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes Make use of the default gdbarch method gdbarch_dummy_id where possible. I have not tested this change but, by inspecting the code, I believe the default methods are equivalent to the code being deleted. This commit leaves or1k_unwind_sp and or1k_unwind_pc in place. These functions do match the default methods except that they add additional debugging code. In order to preserve the debug I have left these functions unchanged. gdb/ChangeLog: * or1k-tdep.c (or1k_dummy_id): Delete. (or1k_gdbarch_init): Don't register deleted function with gdbarch. --- gdb/ChangeLog | 5 +++++ gdb/or1k-tdep.c | 9 --------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c index 13e130c6fd3..8f6f6e19609 100644 --- a/gdb/or1k-tdep.c +++ b/gdb/or1k-tdep.c @@ -789,14 +789,6 @@ or1k_push_dummy_call (struct gdbarch *gdbarch, struct value *function, return sp; } -/* Implement the dummy_id gdbarch method. */ - -static struct frame_id -or1k_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) -{ - return frame_id_build (get_frame_sp (this_frame), - get_frame_pc (this_frame)); -} /* Support functions for frame handling. */ @@ -1184,7 +1176,6 @@ or1k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_call_dummy_location (gdbarch, ON_STACK); set_gdbarch_push_dummy_code (gdbarch, or1k_push_dummy_code); set_gdbarch_push_dummy_call (gdbarch, or1k_push_dummy_call); - set_gdbarch_dummy_id (gdbarch, or1k_dummy_id); /* Frame unwinders. Use DWARF debug info if available, otherwise use our own unwinder. */