From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89399 invoked by alias); 8 Sep 2018 04:46:16 -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 89343 invoked by uid 89); 8 Sep 2018 04:46:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.2 spammy=or1k X-HELO: jocasta.intra Received: from de.cellform.com (HELO jocasta.intra) (88.217.224.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Sep 2018 04:46:09 +0000 Received: from jocasta.intra (localhost [127.0.0.1]) by jocasta.intra (8.15.2/8.15.2/Debian-8) with ESMTPS id w884k7oY026777 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 8 Sep 2018 06:46:07 +0200 Received: (from john@localhost) by jocasta.intra (8.15.2/8.15.2/Submit) id w884k5aJ026776; Sat, 8 Sep 2018 06:46:05 +0200 Date: Sat, 08 Sep 2018 04:46:00 -0000 From: John Darrington To: Tom Tromey Cc: John Darrington , gdb-patches@sourceware.org Subject: Re: [PATCH 4/4] GDB: New target s12z Message-ID: <20180908044605.ctlyone5vd4sx6jt@jocasta.intra> References: <20180829141845.26378-1-john@darrington.wattle.id.au> <20180829141845.26378-5-john@darrington.wattle.id.au> <874lf1vuca.fsf@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874lf1vuca.fsf@tromey.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-09/txt/msg00155.txt.bz2 On Fri, Sep 07, 2018 at 04:03:17PM -0600, Tom Tromey wrote: >>>>> "John" == John Darrington writes: Thank you for the patch. It seems generally good. I have a few nits, but nothing serious. John> diff --git a/gdb/Makefile.in b/gdb/Makefile.in John> index 118c3c8062..f448d1ee19 100644 John> --- a/gdb/Makefile.in John> +++ b/gdb/Makefile.in John> @@ -758,6 +758,7 @@ ALL_TARGET_OBS = \ John> rs6000-lynx178-tdep.o \ John> rs6000-tdep.o \ John> rx-tdep.o \ John> + s12z-tdep.o \ This change should be mentioned in the ChangeLog. John> + John> +#define N_PHYSICAL_REGISTERS (S12Z_N_REGISTERS - 2) John> + John> +static const int reg_perm[N_PHYSICAL_REGISTERS] = John> + { New functions, comments, and macros should have an explanatory comment. Sometimes this can be just a reference to some generic thing, like implementations of gdbarch methods can refer to gdbarch.h. There are a number of cases of this in the file. John> + /* registers is declared in opcodes/s12z.h */ GNU comment style is to start with a capital letter and end with a period and two spaces. John> + if (0 != prologue_end) John> + { John> + struct symtab_and_line prologue_sal = find_pc_line (start_pc, 0); John> + struct compunit_symtab *compunit John> + = SYMTAB_COMPUNIT (prologue_sal.symtab); John> + const char *debug_format = COMPUNIT_DEBUGFORMAT (compunit); John> + John> + if ((NULL != debug_format) John> + && (strlen ("dwarf") <= strlen (debug_format)) John> + && (0 == strncasecmp ("dwarf", debug_format, strlen ("dwarf")))) John> + return (prologue_end > pc) ? prologue_end : pc; John> + } Is this stuff useful? I suspect not. In fact, I'm very dubious about the whole skip_prologue_using_sal function. It seems to not work very well. John> + /* JPB: 28-Apr-11. This is a temporary patch, to get round GDB John> + crashing right at the beginning. Build the frame ID as best we John> + can. */ John> + trad_frame_set_id (info, frame_id_build (this_sp, this_pc)); Could you explain this more? I'm afraid I can't. This was code I took over from the or1k target.