Commit bf9a735e authored by Andrew Burgess's avatar Andrew Burgess
Browse files

gdb: Handle alignment for C++ structures with static members

In 'type_align' when computing the alignment of a structure we should
not consider the alignment of static structure members, these are
usually stored outside of the structure and therefore don't have any
impact on the structures alignment requirements.

I've extended the existing alignment calculating test to compile in
both C and C++ now so that we can create structures with static
members.

gdb/ChangeLog:

	* gdbtypes.c (type_align): Don't consider static members when
	computing structure alignment.

gdb/testsuite/ChangeLog:

	* gdb.base/align.exp: Extend to compile in both C and C++, and add
	tests for structs with static members.
parent 5561fc30
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment