From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3482 invoked by alias); 23 Nov 2016 22:11:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 580 invoked by uid 89); 23 Nov 2016 22:11:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_ASCII_DIVIDERS,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=frameless, Stefan, inferiorh, inferior.h X-HELO: mail-pg0-f65.google.com Received: from mail-pg0-f65.google.com (HELO mail-pg0-f65.google.com) (74.125.83.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 23 Nov 2016 22:11:20 +0000 Received: by mail-pg0-f65.google.com with SMTP id 3so1928776pgd.0 for ; Wed, 23 Nov 2016 14:11:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w2wRzcbtpOGKKISO+TnACMDvNjvKfkmiVMItrCvM1uo=; b=Rv7+dPn3OvDpVsKRCtWy2biWGWhqav/tjgGRNAWrMPo5k8VB0Dd4I1+oDDSm6X6WTz +yPXpIqHIuMnCGcDU9BelZN8KOF7yEa7a0y24dkb1iicrfseAPV/kOVzhG+PeJXPzvm4 WTI3ImKiNlRJSt3AEuLFXxd8gTmH8uccimJkJCkw9RjTzsXe5r13ctx/78JUas2f8zNQ 9/8PMl5HpUusk/azmPfG8wf3qZNTuUXnjSFk+OhG6GXPkOZq2RhVtiE44MnzG3IwI8BI USePARTSild+YalyWk/VHp0ej4VHGF9JAQpHpESpf6qVAz4P6ThlQIoUfNN5bR92Np87 zJeA== X-Gm-Message-State: AKaTC00KagHNo+yGltZZlSDxjF4cO1cCbq+6i7nTpMaYh8a+itxgacAVggu8W4oOabz52A== X-Received: by 10.84.173.195 with SMTP id p61mr11275190plb.68.1479939078511; Wed, 23 Nov 2016 14:11:18 -0800 (PST) Received: from lianli.shorne-pla.net (z14.124-44-185.ppp.wakwak.ne.jp. [124.44.185.14]) by smtp.gmail.com with ESMTPSA id g27sm28801373pfk.58.2016.11.23.14.11.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Nov 2016 14:11:17 -0800 (PST) Received: from lianli.shorne-pla.net (localhost [127.0.0.1]) by lianli.shorne-pla.net (8.15.2/8.15.2) with ESMTPS id uANMBFQd001493 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 24 Nov 2016 07:11:15 +0900 Received: (from shorne@localhost) by lianli.shorne-pla.net (8.15.2/8.15.2/Submit) id uANMBFV8001492; Thu, 24 Nov 2016 07:11:15 +0900 From: Stafford Horne To: gdb-patches@sourceware.org Cc: openrisc@lists.librecores.org, Stefan Wallentowitz Subject: [PATCH 12/18] gdb: or1k: Apply changes of the last two years Date: Wed, 23 Nov 2016 22:13:00 -0000 Message-Id: <1479939044-1341-13-git-send-email-shorne@gmail.com> In-Reply-To: <1479939044-1341-1-git-send-email-shorne@gmail.com> References: <1479939044-1341-1-git-send-email-shorne@gmail.com> X-IsSubscribed: yes X-SW-Source: 2016-11/txt/msg00704.txt.bz2 From: Stefan Wallentowitz gdb/ChangeLog: * or1k-tdep.c (or1k_analyse_inst): s/fatal/throw_quit/ (or1k_skip_prologue): use SYMTAB_COMPUNIT and COMPUNIT_DEBUGFORMAT (or1k_frame_cache): s/fatal/throw_quit/ (or1k_regset_from_core_section): remove (or1k_iterate_over_regset_sections): create, blank implementation --- gdb/or1k-tdep.c | 44 ++++++++++++++++---------------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c index ae57734..8cfa440 100644 --- a/gdb/or1k-tdep.c +++ b/gdb/or1k-tdep.c @@ -89,7 +89,7 @@ #include "demangle.h" #include "defs.h" -#include "gdb_string.h" +#include #include "frame.h" #include "inferior.h" #include "symtab.h" @@ -260,7 +260,7 @@ or1k_analyse_inst (uint32_t inst, /* Check we got something, and if so skip on */ if (start_ptr == end_ptr) { - fatal ("bitstring \"%s\" at offset %d has no length field.\n", + throw_quit ("bitstring \"%s\" at offset %d has no length field.\n", format, i); } @@ -271,7 +271,7 @@ or1k_analyse_inst (uint32_t inst, just should not be wrong. */ if ('b' != format[i++]) { - fatal ("bitstring \"%s\" at offset %d has no terminating 'b'.\n", + throw_quit ("bitstring \"%s\" at offset %d has no terminating 'b'.\n", format, i); } @@ -292,7 +292,7 @@ or1k_analyse_inst (uint32_t inst, break; default: - fatal ("invalid character in bitstring \"%s\" at offset %d.\n", + throw_quit ("invalid character in bitstring \"%s\" at offset %d.\n", format, i); break; } @@ -977,7 +977,8 @@ or1k_skip_prologue (struct gdbarch *gdbarch, if (0 != prologue_end) { struct symtab_and_line prologue_sal = find_pc_line (start_pc, 0); - const char *debug_format = prologue_sal.symtab->debugformat; + struct compunit_symtab *compunit = SYMTAB_COMPUNIT(prologue_sal.symtab); + const char *debug_format = COMPUNIT_DEBUGFORMAT(compunit); if ((NULL != debug_format) && (strlen ("dwarf") <= strlen (debug_format)) && (0 == strncasecmp ("dwarf", debug_format, strlen ("dwarf")))) @@ -1575,7 +1576,7 @@ or1k_frame_cache (struct frame_info *this_frame, are frameless and can give up here. */ if (end_addr < start_addr) { - fatal ("end addr 0x%08x is less than start addr 0x%08x\n", + throw_quit ("end addr 0x%08x is less than start addr 0x%08x\n", (unsigned int) end_addr, (unsigned int) start_addr); } @@ -1850,28 +1851,15 @@ or1k_frame_base_sniffer (struct frame_info *this_frame) } /* or1k_frame_base_sniffer () */ #endif - -/* -------------------------------------------------------------------------- */ -/*!Return information needed to handle a core file. - - We put together a regset structure that tells the system how to transfer - registers to and from a core file image. - - @param[in] gdbarch The GDB architecture we are using. - @param[in] sect_name The name of the section being considered. - @param[in] sect_size The size of the section being considered. - - @return A regset structure for the section, or NULL if none is available. */ -/* -------------------------------------------------------------------------- */ -static const struct regset * -or1k_regset_from_core_section (struct gdbarch *gdbarch, - const char *sect_name, - size_t sect_size) +/* Iterate over core file register note sections. */ +static void +or1k_iterate_over_regset_sections (struct gdbarch *gdbarch, + iterate_over_regset_sections_cb *cb, + void *cb_data, + const struct regcache *regcache) { - printf ("sect_name \"%s\", sect_size %zd\n", sect_name, sect_size); - return NULL; - -} /* or1k_regset_from_core_section () */ + // TODO: Do we need to put something here? (wallento) +} /* -------------------------------------------------------------------------- */ /*!Create a register group based on a group name. @@ -2091,7 +2079,7 @@ or1k_gdbarch_init (struct gdbarch_info info, #endif /* Handle core files */ - set_gdbarch_regset_from_core_section (gdbarch, or1k_regset_from_core_section); + set_gdbarch_iterate_over_regset_sections (gdbarch, or1k_iterate_over_regset_sections); /* Frame unwinders. Use DWARF debug info if available, otherwise use our own unwinder. */ -- 2.7.4