From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88202 invoked by alias); 17 Apr 2019 20:59:51 -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 88194 invoked by uid 89); 17 Apr 2019 20:59:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-12.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*RU:sk:host86-, HX-Spam-Relays-External:sk:host86-, H*r:sk:host86-, sk:nds32_g 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; Wed, 17 Apr 2019 20:59:50 +0000 Received: by mail-wm1-f66.google.com with SMTP id a184so253331wma.2 for ; Wed, 17 Apr 2019 13:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7jT7m23MFflrKXe00xut18H4T768JTjmzuc3ZDVkT6s=; b=ase3dGwN3oLngc8e0vqmbQPh3rYj1IBJa+iCt3+FX2EauMVSYrNrJwZIbVi2sEt9ei 5KYtvR0FzbnBc6ExgWQGK0lVVo5+wrIbNmD49GO/NaLPPqBgcvyDvY6sXq15h4gOfmyL XwNn2HySRHtOoqWqo7QIYBmBAqLjGhogQeu3x5s1UIYaN0X2I0ftNeWwlr+CtmCKfP/v mMnT/jd1nkaWgUTHFEBGpN1fk3ijBDQFIJLsMvbn8+y2rWFvNJ+yJo5CBGMzDfMy45OZ QRY52R7CNmGNlNSgFujoINH3GHFSlGdck8Zz221z9CsK4Fij32CKgfdHejl3zkJTGf05 qNWg== Return-Path: Received: from localhost (host86-164-133-98.range86-164.btcentralplus.com. [86.164.133.98]) by smtp.gmail.com with ESMTPSA id s16sm53685259wrw.58.2019.04.17.13.59.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Apr 2019 13:59:47 -0700 (PDT) Date: Wed, 17 Apr 2019 20:59:00 -0000 From: Andrew Burgess To: Kevin Buettner Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 3/3] gdb/nds32: Use type_align instead of nds32_type_align Message-ID: <20190417205945.GR2737@embecosm.com> References: <6e5973aace6c35e5edfd75ce7b268f44b7bd42a2.1555111225.git.andrew.burgess@embecosm.com> <20190414115352.4a3cb8a2@f29-4.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190414115352.4a3cb8a2@f29-4.lan> X-Fortune: You can always tell luck from ability by its duration. X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00301.txt.bz2 * Kevin Buettner [2019-04-14 11:53:52 -0700]: > On Sat, 13 Apr 2019 00:25:34 +0100 > Andrew Burgess wrote: > > > The general type_align method should be a suitable alternative to > > nds32_type_align, so switch to use that. > > > > The only change this will introduce is related to static fields in a > > struct or union, the existing code doesn't take account of static > > fields when computing the alignment for structs of unions, though this > > is probably a bug - which would probably be exposed by the test case > > gdb.cp/many-args.exp, though I don't have any way to test this target > > right now. > > > > gdb/ChangeLog: > > > > * nds32-tdep.c (nds32_type_align): Delete. > > (nds32_push_dummy_call): Use type_align instead. > > I think that nds32_type_align needs to be registered in > nds32_gdbarch_init(). No, I deleted nds32_type_align completely. It doesn't have any special vector type handling, so the default type_align should be fine. The one change that will be seen is that the old nds32_type_align counts static fields within structs when computing the alignment. I haven't tried any testing, but I would guess this was a bug. Unless someone has the ability to test the target I'll probably just push this change, and if it turns out the static field handling is wrong, then it's easy enough to fix later. Thanks, Andrew > > Otherwise, LGTM. > > Kevin