From patchwork Wed Mar 27 21:34:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 32034 Received: (qmail 103257 invoked by alias); 27 Mar 2019 21:35:32 -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 100985 invoked by uid 89); 27 Mar 2019 21:35:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.2 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= X-HELO: mail-wr1-f65.google.com Received: from mail-wr1-f65.google.com (HELO mail-wr1-f65.google.com) (209.85.221.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Mar 2019 21:35:11 +0000 Received: by mail-wr1-f65.google.com with SMTP id w1so20378898wrp.2 for ; Wed, 27 Mar 2019 14:35:11 -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=ArxP2BXKzrejGRKHs8QDdbUB0AiXMwCRMLQ9xrMmAW8=; b=boLuUpgXFcfDBqfDugD+ckiWBzGSXJYNImlEWXFUdwPlFvhBVFDpOpOgXwEipHPoos aB39Orgi4qfSrVmlD4TO4ypVwTQ5kdWK0ng9zaOv6ad9eTO5XzwKK02R5tgo8ZKmrb4Q VOGbpUJmcZv9O5gQNfiNnRxl9+It89L/sk1XKCrEQM015bL0oh1kAPNogzg7Ykbnq8Wy 1Bew3Waq+H118gBpbE22qdi76Erpoq5IWM3Ay/IEgTHcOtnTOd5fFG8FFJnDoM5oFXRe O+rJQ3kJdQzpG0SVTgPEioR2PeKzvUCpUETywHe0GpFqyB+8ofAlVTBZ+A56dQ7VxL1C OQ/g== Return-Path: Received: from localhost (host81-151-161-58.range81-151.btcentralplus.com. [81.151.161.58]) by smtp.gmail.com with ESMTPSA id g8sm49023915wro.77.2019.03.27.14.35.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Mar 2019 14:35:08 -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 24/25] gdb/rl78: Use default gdbarch methods where possible Date: Wed, 27 Mar 2019 21:34:20 +0000 Message-Id: <0da38d6a7e027a236d1db7dc22fd0b54f32f2f77.1553721879.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes Make use of the default gdbarch method gdbarch_unwind_sp 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. gdb/ChangeLog: * rl78-tdep.c (rl78_unwind_sp): Delete. (rl78_gdbarch_init): Don't register deleted function with gdbarch. --- gdb/ChangeLog | 5 +++++ gdb/rl78-tdep.c | 9 --------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c index 52e52a40b9f..f66cda88179 100644 --- a/gdb/rl78-tdep.c +++ b/gdb/rl78-tdep.c @@ -1084,14 +1084,6 @@ rl78_unwind_pc (struct gdbarch *arch, struct frame_info *next_frame) RL78_PC_REGNUM)); } -/* Implement the "unwind_sp" gdbarch method. */ - -static CORE_ADDR -rl78_unwind_sp (struct gdbarch *arch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, RL78_SP_REGNUM); -} - /* Given a frame described by THIS_FRAME, decode the prologue of its associated function if there is not cache entry as specified by THIS_PROLOGUE_CACHE. Save the decoded prologue in the cache and @@ -1470,7 +1462,6 @@ rl78_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_inner_than (gdbarch, core_addr_lessthan); set_gdbarch_skip_prologue (gdbarch, rl78_skip_prologue); set_gdbarch_unwind_pc (gdbarch, rl78_unwind_pc); - set_gdbarch_unwind_sp (gdbarch, rl78_unwind_sp); set_gdbarch_frame_align (gdbarch, rl78_frame_align); dwarf2_append_unwinders (gdbarch);