[binutils-gdb] gdb/amd64: Ignore zero sized fields when calling functions

sergiodj+buildbot@sergiodj.net sergiodj+buildbot@sergiodj.net
Tue Mar 6 10:29:00 GMT 2018


*** TEST RESULTS FOR COMMIT 5dc4391345f6e86906a57af1434025cfb47b4100 ***

Author: Andrew Burgess <andrew.burgess@embecosm.com>
Branch: master
Commit: 5dc4391345f6e86906a57af1434025cfb47b4100

gdb/amd64: Ignore zero sized fields when calling functions

In some cases passing an argument to a function on amd64, or attempting
to fetch the return value, can trigger an assertion failure within GDB.
An example of a type that would trigger such an error is:

  struct foo_t
  {
    long double a;
    struct {
      struct {
        /* Empty.  */
      } es1;
    } s1;
  };

GCC does permit empty structures, so we should probably support this.

The test that exposes this bug is in the next commit along with the
RiscV support.

gdb/ChangeLog:

	* amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
	fields within aggregates.



More information about the Gdb-testers mailing list