From patchwork Thu Mar 15 21:51:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 26329 Received: (qmail 65335 invoked by alias); 15 Mar 2018 21:51:40 -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 65190 invoked by uid 89); 15 Mar 2018 21:51:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.3 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=ham version=3.3.2 spammy=75116 X-HELO: mail-wr0-f196.google.com Received: from mail-wr0-f196.google.com (HELO mail-wr0-f196.google.com) (209.85.128.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Mar 2018 21:51:33 +0000 Received: by mail-wr0-f196.google.com with SMTP id s18so9747312wrg.9 for ; Thu, 15 Mar 2018 14:51:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=gN+L/TDw7KAnrsXAzZs7iW1pVvwBd9245Sv9aNgrGqE=; b=RHeUT0y8/GVavcO4EvlUAAUJsTbk6jEcyY2aS5xK7ubWL7Ofz8LgayvunBDjt7KWd1 5zJQDrKjFsQytrBV8n+QRfmKC36hCA1ia7eyWzcUjxMoJ21qpRNIO/a9zb29FGp7sqMK ia082ZqHMPm492ndd9fZVfi1ASOuWTZvDCldzGQmWwGGPv4+lhcszN1kysCCikuC+6B0 FzcdulhDSTfRa3k8wd0HuabAmdEJc2Zn8tdu1nD24npr24Ap289z0JJ14Jo9AUoKWhs5 a1daVQiKDyMggBBG7pon+ZDO+Drw8pubbefLiJY7L88VEiDMJIFnJFw8wACoP7Tjo0TL D+1Q== X-Gm-Message-State: AElRT7EZs/Vf/Y+8Xaqz2Hqf+IcpYBRYmW0eInNjaQOZXWOiwj8LY9ot MXcRITOUb03Fh1NdtnoU57b1JIHZ X-Google-Smtp-Source: AG47ELsqk1atZ4MexoetbJAa+wENgsWL0eUtjzEz+9kTe0V7C3qjXo9CanNSvRgzmQT8RdtTMYQQeA== X-Received: by 10.223.132.197 with SMTP id 63mr8235050wrg.166.1521150689954; Thu, 15 Mar 2018 14:51:29 -0700 (PDT) Received: from localhost (host86-177-103-167.range86-177.btcentralplus.com. [86.177.103.167]) by smtp.gmail.com with ESMTPSA id g84sm4110305wmf.38.2018.03.15.14.51.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Mar 2018 14:51:28 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Yao Qi , Simon Marchi , Andrew Burgess Subject: [PATCHv2 1/4] gdb: Add a default_unwind_pc method for gdbarch Date: Thu, 15 Mar 2018 21:51:21 +0000 Message-Id: <9a7671bebbf387f0c0c9c738715825db90ef7fa7.1521149611.git.andrew.burgess@embecosm.com> In-Reply-To: References: In-Reply-To: References: <20180307220420.23307-1-andrew.burgess@embecosm.com> X-IsSubscribed: yes Many architectures gdbarch unwind_pc method follow the same pattern. Provide a default method and convert targets to use it where possible. gdb/ChangeLog: * aarch64-tdep.c (aarch64_unwind_pc): Deleted. (aarch64_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * alpha-tdep.c (alpha_unwind_pc): Deleted. (alpha_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * bfin-tdep.c (bfin_unwind_pc): Deleted. (bfin_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * cris-tdep.c (cris_unwind_pc): Deleted. (cris_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * frame-unwind.c (default_unwind_pc): New function. * frame-unwind.h (default_unwind_pc): Declare new function. * frame.c: Remove use of gdbarch_unwind_pc_p and reindent. * frv-tdep.c (frv_unwind_pc): Deleted. (frv_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * ft32-tdep.c (ft32_unwind_pc): Deleted. (ft32_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * gdbarch.c: Regenerate. * gdbarch.h: Regenerate. * gdbarch.sh: Update unwind_pc spec, and add new header file to be included. * h8300-tdep.c (h8300_unwind_pc): Deleted. (h8300_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * iq2000-tdep.c (iq2000_unwind_pc): Deleted. (iq2000_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * lm32-tdep.c (lm32_unwind_pc): Deleted. (lm32_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * m32r-tdep.c (m32r_unwind_pc): Deleted. (m32r_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * m68hc11-tdep.c (m68hc11_unwind_pc): Deleted. (m68hc11_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * mep-tdep.c (mep_unwind_pc): Deleted. (mep_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * mn10300-tdep.c (mn10300_unwind_pc): Deleted. (mn10300_frame_unwind_init): Delete use of set_gdbarch_unwind_pc. * moxie-tdep.c (moxie_unwind_pc): Deleted. (moxie_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * msp430-tdep.c (msp430_unwind_pc): Deleted. (msp430_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * nds32-tdep.c (nds32_unwind_pc): Deleted. (nds32_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * riscv-tdep.c (riscv_unwind_pc): Deleted. (riscv_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * rs6000-tdep.c (rs6000_unwind_pc): Deleted. (rs6000_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * rx-tdep.c (rx_unwind_pc): Deleted. (rx_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * score-tdep.c (score_unwind_pc): Deleted. (score_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * sh-tdep.c (sh_unwind_pc): Deleted. (sh_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * sh64-tdep.c (sh64_unwind_pc): Deleted. (sh64_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * sparc-tdep.c (sparc_unwind_pc): Deleted. (sparc32_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * tilegx-tdep.c (tilegx_unwind_pc): Deleted. (tilegx_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * v850-tdep.c (v850_unwind_pc): Deleted. (v850_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * vax-tdep.c (vax_unwind_pc): Deleted. (vax_gdbarch_init): Delete use of set_gdbarch_unwind_pc. * xstormy16-tdep.c (xstormy16_unwind_pc): Deleted. (xstormy16_gdbarch_init): Delete use of set_gdbarch_unwind_pc. --- gdb/ChangeLog | 64 ++++++++++++++++++++++++++++ gdb/aarch64-tdep.c | 12 ------ gdb/alpha-tdep.c | 11 ----- gdb/bfin-tdep.c | 7 --- gdb/cris-tdep.c | 13 ------ gdb/frame-unwind.c | 9 ++++ gdb/frame-unwind.h | 6 +++ gdb/frame.c | 117 ++++++++++++++++++++++++--------------------------- gdb/frv-tdep.c | 7 --- gdb/ft32-tdep.c | 10 ----- gdb/gdbarch.c | 14 ++---- gdb/gdbarch.h | 2 - gdb/gdbarch.sh | 3 +- gdb/h8300-tdep.c | 7 --- gdb/iq2000-tdep.c | 7 --- gdb/lm32-tdep.c | 7 --- gdb/m32r-tdep.c | 11 ----- gdb/m68hc11-tdep.c | 14 ------ gdb/mep-tdep.c | 9 ---- gdb/mn10300-tdep.c | 10 ----- gdb/moxie-tdep.c | 10 ----- gdb/msp430-tdep.c | 9 ---- gdb/nds32-tdep.c | 9 ---- gdb/riscv-tdep.c | 9 ---- gdb/rs6000-tdep.c | 9 ---- gdb/rx-tdep.c | 11 ----- gdb/score-tdep.c | 7 --- gdb/sh-tdep.c | 8 ---- gdb/sh64-tdep.c | 8 ---- gdb/sparc-tdep.c | 9 ---- gdb/tilegx-tdep.c | 7 --- gdb/v850-tdep.c | 8 ---- gdb/vax-tdep.c | 8 ---- gdb/xstormy16-tdep.c | 7 --- 34 files changed, 140 insertions(+), 319 deletions(-) diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index f08945ea071..0f123de6b35 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -988,17 +988,6 @@ aarch64_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) get_frame_pc (this_frame)); } -/* Implement the "unwind_pc" gdbarch method. */ - -static CORE_ADDR -aarch64_unwind_pc (struct gdbarch *gdbarch, struct frame_info *this_frame) -{ - CORE_ADDR pc - = frame_unwind_register_unsigned (this_frame, AARCH64_PC_REGNUM); - - return pc; -} - /* Implement the "unwind_sp" gdbarch method. */ static CORE_ADDR @@ -2940,7 +2929,6 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Frame handling. */ set_gdbarch_dummy_id (gdbarch, aarch64_dummy_id); - set_gdbarch_unwind_pc (gdbarch, aarch64_unwind_pc); set_gdbarch_unwind_sp (gdbarch, aarch64_unwind_sp); /* Advance PC across function entry code. */ diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 52a46d96eaf..81ee43c9fa4 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -1479,14 +1479,6 @@ alpha_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) return frame_id_build (base, get_frame_pc (this_frame)); } -static CORE_ADDR -alpha_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - ULONGEST pc; - pc = frame_unwind_register_unsigned (next_frame, ALPHA_PC_REGNUM); - return pc; -} - /* Helper routines for alpha*-nat.c files to move register sets to and from core files. The UNIQUE pointer is allowed to be NULL, as most @@ -1813,9 +1805,6 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Methods for saving / extracting a dummy frame's ID. */ set_gdbarch_dummy_id (gdbarch, alpha_dummy_id); - /* Return the unwound PC value. */ - set_gdbarch_unwind_pc (gdbarch, alpha_unwind_pc); - set_gdbarch_inner_than (gdbarch, core_addr_lessthan); set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c index 63fbf6209e2..696786dc1b0 100644 --- a/gdb/bfin-tdep.c +++ b/gdb/bfin-tdep.c @@ -766,12 +766,6 @@ bfin_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) 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) { @@ -836,7 +830,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. */ diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 5fa79ef2cfa..74368b7b0a4 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -651,9 +651,6 @@ static CORE_ADDR crisv32_scan_prologue (CORE_ADDR pc, struct frame_info *this_frame, struct cris_unwind_cache *info); -static CORE_ADDR cris_unwind_pc (struct gdbarch *gdbarch, - struct frame_info *next_frame); - static CORE_ADDR cris_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame); @@ -1373,15 +1370,6 @@ cris_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) return pc_after_prologue; } -static CORE_ADDR -cris_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - ULONGEST pc; - pc = frame_unwind_register_unsigned (next_frame, - gdbarch_pc_regnum (gdbarch)); - return pc; -} - static CORE_ADDR cris_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) { @@ -4096,7 +4084,6 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_breakpoint_kind_from_pc (gdbarch, cris_breakpoint_kind_from_pc); set_gdbarch_sw_breakpoint_from_kind (gdbarch, cris_sw_breakpoint_from_kind); - set_gdbarch_unwind_pc (gdbarch, cris_unwind_pc); set_gdbarch_unwind_sp (gdbarch, cris_unwind_sp); set_gdbarch_dummy_id (gdbarch, cris_dummy_id); diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c index e6e63539ad7..0eed572ebbb 100644 --- a/gdb/frame-unwind.c +++ b/gdb/frame-unwind.c @@ -193,6 +193,15 @@ default_frame_unwind_stop_reason (struct frame_info *this_frame, return UNWIND_NO_REASON; } +/* Default unwind of the PC. */ + +CORE_ADDR +default_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) +{ + int pc_regnum = gdbarch_pc_regnum (gdbarch); + return frame_unwind_register_unsigned (next_frame, pc_regnum); +} + /* Helper functions for value-based register unwinding. These return a (possibly lazy) value of the appropriate type. */ diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h index af220f72a01..4dfc7bedcc6 100644 --- a/gdb/frame-unwind.h +++ b/gdb/frame-unwind.h @@ -70,6 +70,12 @@ enum unwind_stop_reason default_frame_unwind_stop_reason (struct frame_info *this_frame, void **this_cache); +/* A default unwind_pc callback that simply unwinds the register identified + by GDBARCH_PC_REGNUM. */ + +extern CORE_ADDR default_unwind_pc (struct gdbarch *gdbarch, + struct frame_info *next_frame); + /* Assuming the frame chain: (outer) prev <-> this <-> next (inner); use THIS frame, and through it the NEXT frame's register unwind method, to determine the frame ID of THIS frame. diff --git a/gdb/frame.c b/gdb/frame.c index 0b04a4ebacb..340dc99d5af 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -856,76 +856,71 @@ frame_unwind_pc (struct frame_info *this_frame) { if (this_frame->prev_pc.status == CC_UNKNOWN) { - if (gdbarch_unwind_pc_p (frame_unwind_arch (this_frame))) + struct gdbarch *prev_gdbarch; + CORE_ADDR pc = 0; + int pc_p = 0; + + /* The right way. The `pure' way. The one true way. This + method depends solely on the register-unwind code to + determine the value of registers in THIS frame, and hence + the value of this frame's PC (resume address). A typical + implementation is no more than: + + frame_unwind_register (this_frame, ISA_PC_REGNUM, buf); + return extract_unsigned_integer (buf, size of ISA_PC_REGNUM); + + Note: this method is very heavily dependent on a correct + register-unwind implementation, it pays to fix that + method first; this method is frame type agnostic, since + it only deals with register values, it works with any + frame. This is all in stark contrast to the old + FRAME_SAVED_PC which would try to directly handle all the + different ways that a PC could be unwound. */ + prev_gdbarch = frame_unwind_arch (this_frame); + + TRY { - struct gdbarch *prev_gdbarch; - CORE_ADDR pc = 0; - int pc_p = 0; - - /* The right way. The `pure' way. The one true way. This - method depends solely on the register-unwind code to - determine the value of registers in THIS frame, and hence - the value of this frame's PC (resume address). A typical - implementation is no more than: - - frame_unwind_register (this_frame, ISA_PC_REGNUM, buf); - return extract_unsigned_integer (buf, size of ISA_PC_REGNUM); - - Note: this method is very heavily dependent on a correct - register-unwind implementation, it pays to fix that - method first; this method is frame type agnostic, since - it only deals with register values, it works with any - frame. This is all in stark contrast to the old - FRAME_SAVED_PC which would try to directly handle all the - different ways that a PC could be unwound. */ - prev_gdbarch = frame_unwind_arch (this_frame); - - TRY + pc = gdbarch_unwind_pc (prev_gdbarch, this_frame); + pc_p = 1; + } + CATCH (ex, RETURN_MASK_ERROR) + { + if (ex.error == NOT_AVAILABLE_ERROR) { - pc = gdbarch_unwind_pc (prev_gdbarch, this_frame); - pc_p = 1; + this_frame->prev_pc.status = CC_UNAVAILABLE; + + if (frame_debug) + fprintf_unfiltered (gdb_stdlog, + "{ frame_unwind_pc (this_frame=%d)" + " -> }\n", + this_frame->level); } - CATCH (ex, RETURN_MASK_ERROR) + else if (ex.error == OPTIMIZED_OUT_ERROR) { - if (ex.error == NOT_AVAILABLE_ERROR) - { - this_frame->prev_pc.status = CC_UNAVAILABLE; - - if (frame_debug) - fprintf_unfiltered (gdb_stdlog, - "{ frame_unwind_pc (this_frame=%d)" - " -> }\n", - this_frame->level); - } - else if (ex.error == OPTIMIZED_OUT_ERROR) - { - this_frame->prev_pc.status = CC_NOT_SAVED; - - if (frame_debug) - fprintf_unfiltered (gdb_stdlog, - "{ frame_unwind_pc (this_frame=%d)" - " -> }\n", - this_frame->level); - } - else - throw_exception (ex); - } - END_CATCH + this_frame->prev_pc.status = CC_NOT_SAVED; - if (pc_p) - { - this_frame->prev_pc.value = pc; - this_frame->prev_pc.status = CC_VALUE; if (frame_debug) fprintf_unfiltered (gdb_stdlog, - "{ frame_unwind_pc (this_frame=%d) " - "-> %s }\n", - this_frame->level, - hex_string (this_frame->prev_pc.value)); + "{ frame_unwind_pc (this_frame=%d)" + " -> }\n", + this_frame->level); } + else + throw_exception (ex); + } + END_CATCH + + if (pc_p) + { + this_frame->prev_pc.value = pc; + this_frame->prev_pc.status = CC_VALUE; + if (frame_debug) + fprintf_unfiltered (gdb_stdlog, + "{ frame_unwind_pc (this_frame=%d) " + "-> %s }\n", + this_frame->level, + hex_string (this_frame->prev_pc.value)); } - else - internal_error (__FILE__, __LINE__, _("No unwind_pc method")); } if (this_frame->prev_pc.status == CC_VALUE) diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index 2f9a8d27c46..38f996d2e5c 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -1366,12 +1366,6 @@ frv_return_value (struct gdbarch *gdbarch, struct value *function, return RETURN_VALUE_REGISTER_CONVENTION; } -static CORE_ADDR -frv_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, pc_regnum); -} - /* Given a GDB frame, determine the address of the calling function's frame. This will be used to create a new GDB frame struct. */ @@ -1539,7 +1533,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_return_value (gdbarch, frv_return_value); /* Frame stuff. */ - set_gdbarch_unwind_pc (gdbarch, frv_unwind_pc); set_gdbarch_unwind_sp (gdbarch, frv_unwind_sp); set_gdbarch_frame_align (gdbarch, frv_frame_align); frame_base_set_default (gdbarch, &frv_frame_base); diff --git a/gdb/ft32-tdep.c b/gdb/ft32-tdep.c index 7198b84aca0..5c0a3384dbd 100644 --- a/gdb/ft32-tdep.c +++ b/gdb/ft32-tdep.c @@ -492,14 +492,6 @@ ft32_frame_cache (struct frame_info *this_frame, void **this_cache) return cache; } -/* Implement the "unwind_pc" gdbarch method. */ - -static CORE_ADDR -ft32_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, FT32_PC_REGNUM); -} - /* Given a GDB frame, determine the address of the calling function's frame. This will be used to create a new GDB frame struct. */ @@ -627,8 +619,6 @@ ft32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) PUSH_DUMMY_CALL, and saved by generic_save_dummy_frame_tos. */ set_gdbarch_dummy_id (gdbarch, ft32_dummy_id); - set_gdbarch_unwind_pc (gdbarch, ft32_unwind_pc); - /* Hook in ABI-specific overrides, if they have been registered. */ gdbarch_init_osabi (info, gdbarch); diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index b8703e5a556..884b7b24f86 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -48,6 +48,7 @@ #include "regcache.h" #include "objfiles.h" #include "auxv.h" +#include "frame-unwind.h" /* Static function declarations */ @@ -426,6 +427,7 @@ gdbarch_alloc (const struct gdbarch_info *info, gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint; gdbarch->memory_remove_breakpoint = default_memory_remove_breakpoint; gdbarch->remote_register_number = default_remote_register_number; + gdbarch->unwind_pc = default_unwind_pc; gdbarch->stabs_argument_has_addr = default_stabs_argument_has_addr; gdbarch->convert_from_func_ptr_addr = convert_from_func_ptr_addr_identity; gdbarch->addr_bits_remove = core_addr_identity; @@ -612,7 +614,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of remote_register_number, invalid_p == 0 */ /* Skip verify of fetch_tls_load_module_address, has predicate. */ /* Skip verify of frame_args_skip, invalid_p == 0 */ - /* Skip verify of unwind_pc, has predicate. */ + /* Skip verify of unwind_pc, invalid_p == 0 */ /* Skip verify of unwind_sp, has predicate. */ /* Skip verify of frame_num_args, has predicate. */ /* Skip verify of frame_align, has predicate. */ @@ -1435,9 +1437,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: target_desc = %s\n", host_address_to_string (gdbarch->target_desc)); - fprintf_unfiltered (file, - "gdbarch_dump: gdbarch_unwind_pc_p() = %d\n", - gdbarch_unwind_pc_p (gdbarch)); fprintf_unfiltered (file, "gdbarch_dump: unwind_pc = <%s>\n", host_address_to_string (gdbarch->unwind_pc)); @@ -3058,13 +3057,6 @@ set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, gdbarch->frame_args_skip = frame_args_skip; } -int -gdbarch_unwind_pc_p (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - return gdbarch->unwind_pc != NULL; -} - CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) { diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 5cb131de1d2..2ac229cda3a 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -625,8 +625,6 @@ extern void set_gdbarch_fetch_tls_load_module_address (struct gdbarch *gdbarch, extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch); extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip); -extern int gdbarch_unwind_pc_p (struct gdbarch *gdbarch); - typedef CORE_ADDR (gdbarch_unwind_pc_ftype) (struct gdbarch *gdbarch, struct frame_info *next_frame); extern CORE_ADDR gdbarch_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame); extern void set_gdbarch_unwind_pc (struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype *unwind_pc); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 33dfa6b349d..9eab0b30321 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -599,7 +599,7 @@ m;int;remote_register_number;int regno;regno;;default_remote_register_number;;0 F;CORE_ADDR;fetch_tls_load_module_address;struct objfile *objfile;objfile # v;CORE_ADDR;frame_args_skip;;;0;;;0 -M;CORE_ADDR;unwind_pc;struct frame_info *next_frame;next_frame +m;CORE_ADDR;unwind_pc;struct frame_info *next_frame;next_frame;;default_unwind_pc;;0 M;CORE_ADDR;unwind_sp;struct frame_info *next_frame;next_frame # DEPRECATED_FRAME_LOCALS_ADDRESS as been replaced by the per-frame # frame-base. Enable frame-base before frame-unwind. @@ -1648,6 +1648,7 @@ cat <saved_regs, the addresses of the saved registers of frame described by FRAME_INFO. This includes special registers such as pc and fp saved in special ways @@ -1494,7 +1484,6 @@ m68hc11_gdbarch_init (struct gdbarch_info info, /* Characters are unsigned. */ set_gdbarch_char_signed (gdbarch, 0); - set_gdbarch_unwind_pc (gdbarch, m68hc11_unwind_pc); set_gdbarch_unwind_sp (gdbarch, m68hc11_unwind_sp); /* Set register info. */ @@ -1531,9 +1520,6 @@ m68hc11_gdbarch_init (struct gdbarch_info info, PUSH_DUMMY_CALL, and saved by generic_save_dummy_frame_tos. */ set_gdbarch_dummy_id (gdbarch, m68hc11_dummy_id); - /* Return the unwound PC value. */ - set_gdbarch_unwind_pc (gdbarch, m68hc11_unwind_pc); - /* Minsymbol frobbing. */ set_gdbarch_elf_make_msymbol_special (gdbarch, m68hc11_elf_make_msymbol_special); diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c index 1cda2b35af9..af921a86c0c 100644 --- a/gdb/mep-tdep.c +++ b/gdb/mep-tdep.c @@ -2066,14 +2066,6 @@ static const struct frame_unwind mep_frame_unwind = { }; -/* Our general unwinding function can handle unwinding the PC. */ -static CORE_ADDR -mep_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, MEP_PC_REGNUM); -} - - /* Our general unwinding function can handle unwinding the SP. */ static CORE_ADDR mep_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) @@ -2468,7 +2460,6 @@ mep_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Frames and frame unwinding. */ frame_unwind_append_unwinder (gdbarch, &mep_frame_unwind); - set_gdbarch_unwind_pc (gdbarch, mep_unwind_pc); set_gdbarch_unwind_sp (gdbarch, mep_unwind_sp); set_gdbarch_inner_than (gdbarch, core_addr_lessthan); set_gdbarch_frame_args_skip (gdbarch, 0); diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index e12e01df030..0222b3192d1 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -1150,15 +1150,6 @@ static const struct frame_unwind mn10300_frame_unwind = { default_frame_sniffer }; -static CORE_ADDR -mn10300_unwind_pc (struct gdbarch *gdbarch, struct frame_info *this_frame) -{ - ULONGEST pc; - - pc = frame_unwind_register_unsigned (this_frame, E_PC_REGNUM); - return pc; -} - static CORE_ADDR mn10300_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame) { @@ -1174,7 +1165,6 @@ mn10300_frame_unwind_init (struct gdbarch *gdbarch) dwarf2_append_unwinders (gdbarch); frame_unwind_append_unwinder (gdbarch, &mn10300_frame_unwind); set_gdbarch_dummy_id (gdbarch, mn10300_dummy_id); - set_gdbarch_unwind_pc (gdbarch, mn10300_unwind_pc); set_gdbarch_unwind_sp (gdbarch, mn10300_unwind_sp); } diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c index 50cacfef972..2ef1b753109 100644 --- a/gdb/moxie-tdep.c +++ b/gdb/moxie-tdep.c @@ -557,14 +557,6 @@ moxie_frame_cache (struct frame_info *this_frame, void **this_cache) return cache; } -/* Implement the "unwind_pc" gdbarch method. */ - -static CORE_ADDR -moxie_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, MOXIE_PC_REGNUM); -} - /* Given a GDB frame, determine the address of the calling function's frame. This will be used to create a new GDB frame struct. */ @@ -1115,8 +1107,6 @@ moxie_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) PUSH_DUMMY_CALL, and saved by generic_save_dummy_frame_tos. */ set_gdbarch_dummy_id (gdbarch, moxie_dummy_id); - set_gdbarch_unwind_pc (gdbarch, moxie_unwind_pc); - /* Hook in ABI-specific overrides, if they have been registered. */ gdbarch_init_osabi (info, gdbarch); diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c index 169b7e95058..008a178e993 100644 --- a/gdb/msp430-tdep.c +++ b/gdb/msp430-tdep.c @@ -447,14 +447,6 @@ msp430_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) return p.prologue_end; } -/* Implement the "unwind_pc" gdbarch method. */ - -static CORE_ADDR -msp430_unwind_pc (struct gdbarch *arch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, MSP430_PC_REGNUM); -} - /* Implement the "unwind_sp" gdbarch method. */ static CORE_ADDR @@ -995,7 +987,6 @@ msp430_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Frames, prologues, etc. */ set_gdbarch_inner_than (gdbarch, core_addr_lessthan); set_gdbarch_skip_prologue (gdbarch, msp430_skip_prologue); - set_gdbarch_unwind_pc (gdbarch, msp430_unwind_pc); set_gdbarch_unwind_sp (gdbarch, msp430_unwind_sp); set_gdbarch_frame_align (gdbarch, msp430_frame_align); dwarf2_append_unwinders (gdbarch); diff --git a/gdb/nds32-tdep.c b/gdb/nds32-tdep.c index 8cc9d5bc84c..9fe4f6916e3 100644 --- a/gdb/nds32-tdep.c +++ b/gdb/nds32-tdep.c @@ -1398,14 +1398,6 @@ nds32_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) return frame_id_build (sp, get_frame_pc (this_frame)); } -/* Implement the "unwind_pc" gdbarch method. */ - -static CORE_ADDR -nds32_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, NDS32_PC_REGNUM); -} - /* Implement the "unwind_sp" gdbarch method. */ static CORE_ADDR @@ -2141,7 +2133,6 @@ nds32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_sp_regnum (gdbarch, NDS32_SP_REGNUM); set_gdbarch_pc_regnum (gdbarch, NDS32_PC_REGNUM); set_gdbarch_unwind_sp (gdbarch, nds32_unwind_sp); - set_gdbarch_unwind_pc (gdbarch, nds32_unwind_pc); set_gdbarch_stack_frame_destroyed_p (gdbarch, nds32_stack_frame_destroyed_p); set_gdbarch_dwarf2_reg_to_regnum (gdbarch, nds32_dwarf2_reg_to_regnum); diff --git a/gdb/riscv-tdep.c b/gdb/riscv-tdep.c index 655db7cce69..58c3f30ffe3 100644 --- a/gdb/riscv-tdep.c +++ b/gdb/riscv-tdep.c @@ -2325,14 +2325,6 @@ riscv_frame_align (struct gdbarch *gdbarch, CORE_ADDR addr) return align_down (addr, 16); } -/* Implement the unwind_pc gdbarch method. */ - -static CORE_ADDR -riscv_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, RISCV_PC_REGNUM); -} - /* Implement the unwind_sp gdbarch method. */ static CORE_ADDR @@ -2547,7 +2539,6 @@ riscv_gdbarch_init (struct gdbarch_info info, set_gdbarch_frame_align (gdbarch, riscv_frame_align); /* Functions to access frame data. */ - set_gdbarch_unwind_pc (gdbarch, riscv_unwind_pc); set_gdbarch_unwind_sp (gdbarch, riscv_unwind_sp); /* Functions handling dummy frames. */ diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index a5b70917b7e..66c88d452f5 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -3255,13 +3255,6 @@ find_variant_by_arch (enum bfd_architecture arch, unsigned long mach) } -static CORE_ADDR -rs6000_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, - gdbarch_pc_regnum (gdbarch)); -} - static struct frame_id rs6000_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) { @@ -6578,7 +6571,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) case GDB_OSABI_LINUX: case GDB_OSABI_NETBSD: case GDB_OSABI_UNKNOWN: - set_gdbarch_unwind_pc (gdbarch, rs6000_unwind_pc); frame_unwind_append_unwinder (gdbarch, &rs6000_epilogue_frame_unwind); frame_unwind_append_unwinder (gdbarch, &rs6000_frame_unwind); set_gdbarch_dummy_id (gdbarch, rs6000_dummy_id); @@ -6587,7 +6579,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) default: set_gdbarch_believe_pcc_promotion (gdbarch, 1); - set_gdbarch_unwind_pc (gdbarch, rs6000_unwind_pc); frame_unwind_append_unwinder (gdbarch, &rs6000_epilogue_frame_unwind); frame_unwind_append_unwinder (gdbarch, &rs6000_frame_unwind); set_gdbarch_dummy_id (gdbarch, rs6000_dummy_id); diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c index 94d57913a31..3d982795db4 100644 --- a/gdb/rx-tdep.c +++ b/gdb/rx-tdep.c @@ -751,16 +751,6 @@ static const struct frame_unwind rx_exception_unwind = { rx_exception_sniffer }; -/* Implement the "unwind_pc" gdbarch method. */ -static CORE_ADDR -rx_unwind_pc (struct gdbarch *gdbarch, struct frame_info *this_frame) -{ - ULONGEST pc; - - pc = frame_unwind_register_unsigned (this_frame, RX_PC_REGNUM); - return pc; -} - /* Implement the "unwind_sp" gdbarch method. */ static CORE_ADDR rx_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame) @@ -1110,7 +1100,6 @@ rx_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_sw_breakpoint_from_kind (gdbarch, rx_breakpoint::bp_from_kind); set_gdbarch_skip_prologue (gdbarch, rx_skip_prologue); - set_gdbarch_unwind_pc (gdbarch, rx_unwind_pc); set_gdbarch_unwind_sp (gdbarch, rx_unwind_sp); /* Target builtin data types. */ diff --git a/gdb/score-tdep.c b/gdb/score-tdep.c index a1679323273..c0f1291ed52 100644 --- a/gdb/score-tdep.c +++ b/gdb/score-tdep.c @@ -70,12 +70,6 @@ score_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) return frame_unwind_register_unsigned (next_frame, SCORE_SP_REGNUM); } -static CORE_ADDR -score_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, SCORE_PC_REGNUM); -} - static const char * score7_register_name (struct gdbarch *gdbarch, int regnum) { @@ -1481,7 +1475,6 @@ score_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frame_align (gdbarch, score_frame_align); set_gdbarch_inner_than (gdbarch, core_addr_lessthan); set_gdbarch_unwind_sp (gdbarch, score_unwind_sp); - set_gdbarch_unwind_pc (gdbarch, score_unwind_pc); switch (target_mach) { diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 75ea673b82a..2f022909d6d 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -1983,13 +1983,6 @@ sh_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) gdbarch_sp_regnum (gdbarch)); } -static CORE_ADDR -sh_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, - gdbarch_pc_regnum (gdbarch)); -} - static struct frame_id sh_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) { @@ -2311,7 +2304,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frame_align (gdbarch, sh_frame_align); set_gdbarch_unwind_sp (gdbarch, sh_unwind_sp); - set_gdbarch_unwind_pc (gdbarch, sh_unwind_pc); set_gdbarch_dummy_id (gdbarch, sh_dummy_id); frame_base_set_default (gdbarch, &sh_frame_base); diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c index 8eb88eb3adf..9066c7cd9fe 100644 --- a/gdb/sh64-tdep.c +++ b/gdb/sh64-tdep.c @@ -2319,13 +2319,6 @@ sh64_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) gdbarch_sp_regnum (gdbarch)); } -static CORE_ADDR -sh64_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, - gdbarch_pc_regnum (gdbarch)); -} - static struct frame_id sh64_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) { @@ -2421,7 +2414,6 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frame_align (gdbarch, sh64_frame_align); set_gdbarch_unwind_sp (gdbarch, sh64_unwind_sp); - set_gdbarch_unwind_pc (gdbarch, sh64_unwind_pc); set_gdbarch_dummy_id (gdbarch, sh64_dummy_id); frame_base_set_default (gdbarch, &sh64_frame_base); diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 633bd685bce..17c33d136e7 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1093,13 +1093,6 @@ sparc_analyze_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, return pc; } -static CORE_ADDR -sparc_unwind_pc (struct gdbarch *gdbarch, struct frame_info *this_frame) -{ - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); - return frame_unwind_register_unsigned (this_frame, tdep->pc_regnum); -} - /* Return PC of first real instruction of the function starting at START_PC. */ @@ -1859,8 +1852,6 @@ sparc32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_dummy_id (gdbarch, sparc_dummy_id); - set_gdbarch_unwind_pc (gdbarch, sparc_unwind_pc); - frame_base_set_default (gdbarch, &sparc32_frame_base); /* Hook in the DWARF CFI frame unwinder. */ diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c index 8f688b16cf0..2ed32e3dfa8 100644 --- a/gdb/tilegx-tdep.c +++ b/gdb/tilegx-tdep.c @@ -936,12 +936,6 @@ tilegx_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) return frame_unwind_register_unsigned (next_frame, TILEGX_SP_REGNUM); } -static CORE_ADDR -tilegx_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, TILEGX_PC_REGNUM); -} - static struct frame_id tilegx_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) @@ -1028,7 +1022,6 @@ tilegx_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Frame Info. */ set_gdbarch_unwind_sp (gdbarch, tilegx_unwind_sp); - set_gdbarch_unwind_pc (gdbarch, tilegx_unwind_pc); set_gdbarch_dummy_id (gdbarch, tilegx_unwind_dummy_id); set_gdbarch_frame_align (gdbarch, tilegx_frame_align); frame_base_set_default (gdbarch, &tilegx_frame_base); diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index ac7d6aa4240..ce8b400fcdb 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -1333,13 +1333,6 @@ v850_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) gdbarch_sp_regnum (gdbarch)); } -static CORE_ADDR -v850_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, - gdbarch_pc_regnum (gdbarch)); -} - static struct frame_id v850_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) { @@ -1465,7 +1458,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frame_align (gdbarch, v850_frame_align); set_gdbarch_unwind_sp (gdbarch, v850_unwind_sp); - set_gdbarch_unwind_pc (gdbarch, v850_unwind_pc); set_gdbarch_dummy_id (gdbarch, v850_dummy_id); frame_base_set_default (gdbarch, &v850_frame_base); diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index 4c1ab2e73e6..a8c2b31dbdc 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -435,12 +435,6 @@ vax_frame_num_args (struct frame_info *frame) args = get_frame_register_unsigned (frame, VAX_AP_REGNUM); return get_frame_memory_unsigned (frame, args, 1); } - -static CORE_ADDR -vax_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, VAX_PC_REGNUM); -} /* Initialize the current architecture based on INFO. If possible, re-use an @@ -501,8 +495,6 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_function_start_offset (gdbarch, 2); set_gdbarch_believe_pcc_promotion (gdbarch, 1); - set_gdbarch_unwind_pc (gdbarch, vax_unwind_pc); - frame_base_set_default (gdbarch, &vax_frame_base); /* Hook in ABI-specific overrides, if they have been registered. */ diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 31650ac3a95..4d5c50e0755 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -757,12 +757,6 @@ xstormy16_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) return frame_unwind_register_unsigned (next_frame, E_SP_REGNUM); } -static CORE_ADDR -xstormy16_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - return frame_unwind_register_unsigned (next_frame, E_PC_REGNUM); -} - static struct frame_id xstormy16_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) { @@ -825,7 +819,6 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) * Frame Info */ set_gdbarch_unwind_sp (gdbarch, xstormy16_unwind_sp); - set_gdbarch_unwind_pc (gdbarch, xstormy16_unwind_pc); set_gdbarch_dummy_id (gdbarch, xstormy16_dummy_id); set_gdbarch_frame_align (gdbarch, xstormy16_frame_align); frame_base_set_default (gdbarch, &xstormy16_frame_base);