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: [PATCHv3 1/2] gdb/amd64: Ignore zero sized fields when calling functions


On 2018-03-02 03:09 PM, Andrew Burgess wrote:
> 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.

Good job on the test :).  This patch LGTM.

Simon


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