This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/3] gdb/nds32: Use type_align instead of nds32_type_align


* Kevin Buettner <kevinb@redhat.com> [2019-04-14 11:53:52 -0700]:

> On Sat, 13 Apr 2019 00:25:34 +0100
> Andrew Burgess <andrew.burgess@embecosm.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]