diff options
Diffstat (limited to 'gdb/gnu-v3-abi.c')
-rw-r--r-- | gdb/gnu-v3-abi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c index f9d4f49..b1ddf02 100644 --- a/gdb/gnu-v3-abi.c +++ b/gdb/gnu-v3-abi.c @@ -835,9 +835,10 @@ gnuv3_pass_by_reference (struct type *type) by reference, so does this class. Similarly for members, which are constructed whenever this class is. We do not need to worry about recursive loops here, since we are only looking at members - of complete class type. */ + of complete class type. Also ignore any static members. */ for (fieldnum = 0; fieldnum < TYPE_NFIELDS (type); fieldnum++) - if (gnuv3_pass_by_reference (TYPE_FIELD_TYPE (type, fieldnum))) + if (! field_is_static (&TYPE_FIELD (type, fieldnum)) + && gnuv3_pass_by_reference (TYPE_FIELD_TYPE (type, fieldnum))) return 1; return 0; |