From patchwork Thu Dec 27 14:08:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 30855 Received: (qmail 119013 invoked by alias); 27 Dec 2018 14:09:02 -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 118930 invoked by uid 89); 27 Dec 2018 14:09:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= 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; Thu, 27 Dec 2018 14:08:59 +0000 Received: by mail-wm1-f66.google.com with SMTP id d15so16824784wmb.3 for ; Thu, 27 Dec 2018 06:08:58 -0800 (PST) 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=m9Hrk+bECQj7RDvoHHW9p403qS6QaTNUxd9OB3ncLFg=; b=VaK8AxvJhH/eqbkPCbIa78oFW7pAC81xKXsZcNHjhVB7XJQ14NAJZaLdmzy75d7w+t 2rAyRgQc67RRS4Qz177Z91AWCyplL+OZxMZu44J9/sygwQwZ4XY8BMl0lKWiIGQ0VhHr cKrbNo299yvKGecoQJ4uYNlygyylBU67BIG8WZeBa6QPyFLW6IfJGx3wStaNJoHwPUak aGi2cCKWk88oN5p3qxYJUEFp04yPtI/qDTFVxgiyWY6rwOuiidXFeM7C/Hc4YngvDyZs +8XJse5gRKRmoTKYajrgvKKYfQlRx5cKYW9V2qmZnLKuTTI0K9St0LypcbyMFCeGV8Xi whgg== Return-Path: Received: from localhost (host86-156-236-210.range86-156.btcentralplus.com. [86.156.236.210]) by smtp.gmail.com with ESMTPSA id c7sm58626975wre.64.2018.12.27.06.08.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Dec 2018 06:08:55 -0800 (PST) From: Andrew Burgess To: gdb-patches@sourceware.org, vapier@gentoo.org Cc: alan.hayward@arm.com, abidh@codesourcery.com, Anton.Kolesov@synopsys.com, hp@axis.com, jamesb@excamera.com, Andrew Burgess Subject: [PATCH 05/12] gdb/bfin: Use default gdbarch methods where possible Date: Thu, 27 Dec 2018 14:08:29 +0000 Message-Id: In-Reply-To: References: In-Reply-To: References: X-IsSubscribed: yes Make use of the default gdbarch methods for gdbarch_dummy_id, and gdbarch_unwind_pc. 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: * gdb/bfin-tdep.c (bfin_dummy_id): Delete. (bfin_unwind_pc): Delete. (bfin_gdbarch_init): Don't register deleted functions with gdbarch. --- gdb/ChangeLog | 6 ++++++ gdb/bfin-tdep.c | 18 ------------------ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c index b064a6cef9f..995217b665c 100644 --- a/gdb/bfin-tdep.c +++ b/gdb/bfin-tdep.c @@ -756,22 +756,6 @@ static const struct frame_base bfin_frame_base = bfin_frame_args_address }; -static struct frame_id -bfin_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) -{ - CORE_ADDR sp; - - sp = get_frame_register_unsigned (this_frame, BFIN_SP_REGNUM); - - return frame_id_build (sp, get_frame_pc (this_frame)); -} - -static CORE_ADDR -bfin_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, BFIN_PC_REGNUM); -} - static CORE_ADDR bfin_frame_align (struct gdbarch *gdbarch, CORE_ADDR address) { @@ -826,7 +810,6 @@ bfin_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_dwarf2_reg_to_regnum (gdbarch, bfin_reg_to_regnum); set_gdbarch_register_name (gdbarch, bfin_register_name); set_gdbarch_register_type (gdbarch, bfin_register_type); - set_gdbarch_dummy_id (gdbarch, bfin_dummy_id); set_gdbarch_push_dummy_call (gdbarch, bfin_push_dummy_call); set_gdbarch_believe_pcc_promotion (gdbarch, 1); set_gdbarch_return_value (gdbarch, bfin_return_value); @@ -836,7 +819,6 @@ bfin_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_sw_breakpoint_from_kind (gdbarch, bfin_sw_breakpoint_from_kind); set_gdbarch_decr_pc_after_break (gdbarch, 2); set_gdbarch_frame_args_skip (gdbarch, 8); - set_gdbarch_unwind_pc (gdbarch, bfin_unwind_pc); set_gdbarch_frame_align (gdbarch, bfin_frame_align); /* Hook in ABI-specific overrides, if they have been registered. */