From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19272 invoked by alias); 6 Sep 2013 08:25:39 -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 19260 invoked by uid 89); 6 Sep 2013 08:25:39 -0000 Received: from anubis.se.axis.com (HELO anubis.se.axis.com) (195.60.68.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Sep 2013 08:25:39 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: anubis.se.axis.com Received: from localhost (localhost [127.0.0.1]) by anubis.se.axis.com (Postfix) with ESMTP id 7FDD119D0D; Fri, 6 Sep 2013 10:25:36 +0200 (CEST) Received: from anubis.se.axis.com ([127.0.0.1]) by localhost (anubis.se.axis.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qYBBq9YJg-Os; Fri, 6 Sep 2013 10:25:35 +0200 (CEST) Received: from boulder.se.axis.com (boulder.se.axis.com [10.0.2.104]) by anubis.se.axis.com (Postfix) with ESMTP id 7FE5B19D0B; Fri, 6 Sep 2013 10:25:35 +0200 (CEST) Received: from boulder.se.axis.com (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id 6956379F; Fri, 6 Sep 2013 10:25:35 +0200 (CEST) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by boulder.se.axis.com (Postfix) with ESMTP id 5E1B95E9; Fri, 6 Sep 2013 10:25:35 +0200 (CEST) Received: from xmail2.se.axis.com (xmail2.se.axis.com [10.0.5.74]) by thoth.se.axis.com (Postfix) with ESMTP id 5C71D3404E; Fri, 6 Sep 2013 10:25:35 +0200 (CEST) Received: from lnxricardw.se.axis.com (10.88.7.1) by xmail2.se.axis.com (10.0.5.74) with Microsoft SMTP Server (TLS) id 8.2.255.0; Fri, 6 Sep 2013 10:25:35 +0200 Date: Fri, 06 Sep 2013 08:25:00 -0000 From: Ricard Wanderlof To: Pedro Alves CC: "gdb-patches@sourceware.org" Subject: Re: [PATCH 2/2][CRIS/CRISv32] Consistent names for cris/crisv32_elf_greg_t In-Reply-To: <5225F849.9040203@redhat.com> Message-ID: References: <5225F849.9040203@redhat.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8BIT X-SW-Source: 2013-09/txt/msg00207.txt.bz2 On Tue, 3 Sep 2013, Pedro Alves wrote: > On 09/03/2013 03:17 PM, Ricard Wanderlof wrote: >> >> This is just a cosmetic change to get consistent names for >> elf_greg_t/crisv32_elf_greg_t in cris-tdep.c . Compile-time tested, then >> tested the result by running the resulting gdb against gdbserver running >> on a target system. > > Thanks. It'll allow putting these types in a header too, if > ever necessary (otherwise, they'd possibly conflict with > asm/elf.h, like in the gdbserver patch). > >> 2013-09-03 Ricard Wanderlof >> >> * cris-tdep.c (cris_elf_greg_t): Rename from elf_greg_t. > > Mention cris_elf_gregset_t, crisv32_elf_gregset_t, and all > the functions that were adjusted. E.g.: > > * cris-tdep.c (cris_elf_greg_t): Rename from elf_greg_t. > (cris_elf_gregset_t): Rename from elf_gregset_t. > (crisv32_elf_gregset_t): Adjust. > (cris_supply_gregset, fetch_core_registers): Adjust. > > OK with that change. Comitted now. /Ricard Cosmetic clean up of names of *elf_greg_t types for CRIS/CRISv32. 2013-09-06 Ricard Wanderlof * cris-tdep.c (cris_elf_greg_t): Rename from elf_greg_t. (cris_elf_gregset_t): Rename from elf_gregset_t. (crisv32_elf_gregset_t): Adjust. (cris_supply_gregset, fetch_core_registers): Adjust. diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 80ab1b8..1b0e3cd 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -3819,25 +3819,25 @@ cris_delayed_get_disassembler (bfd_vma addr, struct disassemble_info *info) return print_insn (addr, info); } -/* Copied from . */ -typedef unsigned char elf_greg_t[4]; +/* Originally from . */ +typedef unsigned char cris_elf_greg_t[4]; /* Same as user_regs_struct struct in . */ #define CRISV10_ELF_NGREG 35 -typedef elf_greg_t elf_gregset_t[CRISV10_ELF_NGREG]; +typedef cris_elf_greg_t cris_elf_gregset_t[CRISV10_ELF_NGREG]; #define CRISV32_ELF_NGREG 32 -typedef elf_greg_t crisv32_elf_gregset_t[CRISV32_ELF_NGREG]; +typedef cris_elf_greg_t crisv32_elf_gregset_t[CRISV32_ELF_NGREG]; -/* Unpack an elf_gregset_t into GDB's register cache. */ +/* Unpack a cris_elf_gregset_t into GDB's register cache. */ static void -cris_supply_gregset (struct regcache *regcache, elf_gregset_t *gregsetp) +cris_supply_gregset (struct regcache *regcache, cris_elf_gregset_t *gregsetp) { struct gdbarch *gdbarch = get_regcache_arch (regcache); struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); int i; - elf_greg_t *regp = *gregsetp; + cris_elf_greg_t *regp = *gregsetp; static char zerobuf[4] = {0}; /* The kernel dumps all 32 registers as unsigned longs, but supply_register @@ -3868,12 +3868,12 @@ fetch_core_registers (struct regcache *regcache, char *core_reg_sect, unsigned core_reg_size, int which, CORE_ADDR reg_addr) { - elf_gregset_t gregset; + cris_elf_gregset_t gregset; switch (which) { case 0: - if (core_reg_size != sizeof (elf_gregset_t) + if (core_reg_size != sizeof (cris_elf_gregset_t) && core_reg_size != sizeof (crisv32_elf_gregset_t)) { warning (_("wrong size gregset struct in core file")); -- Ricard Wolf Wanderlöf ricardw(at)axis.com Axis Communications AB, Lund, Sweden www.axis.com Phone +46 46 272 2016 Fax +46 46 13 61 30