diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 625c416..59a6f0e 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -4426,7 +4426,8 @@ dwarf2_add_member_fn (struct field_info *fip, struct die_info *die, TYPE_TARGET_TYPE (this_type), TYPE_FIELDS (this_type), TYPE_NFIELDS (this_type), - TYPE_VARARGS (this_type)); + TYPE_VARARGS (this_type), + TYPE_CALLING_CONVENTION (this_type)); /* Handle static member functions. Dwarf2 has no clean way to discern C++ static and non-static @@ -4601,7 +4602,8 @@ quirk_gcc_member_function_pointer (struct die_info *die, struct dwarf2_cu *cu) type = alloc_type (objfile, NULL); smash_to_method_type (type, domain_type, TYPE_TARGET_TYPE (pfn_type), TYPE_FIELDS (pfn_type), TYPE_NFIELDS (pfn_type), - TYPE_VARARGS (pfn_type)); + TYPE_VARARGS (pfn_type), + TYPE_CALLING_CONVENTION (pfn_type)); type = lookup_methodptr_type (type); return set_die_type (die, type, cu); } diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 012485c..858d7ca 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1074,7 +1074,7 @@ smash_to_memberptr_type (struct type *type, struct type *domain, void smash_to_method_type (struct type *type, struct type *domain, struct type *to_type, struct field *args, - int nargs, int varargs) + int nargs, int varargs, unsigned calling_convention) { struct objfile *objfile; @@ -1088,6 +1088,7 @@ smash_to_method_type (struct type *type, struct type *domain, TYPE_NFIELDS (type) = nargs; if (varargs) TYPE_VARARGS (type) = 1; + TYPE_CALLING_CONVENTION (type) = calling_convention; TYPE_LENGTH (type) = 1; /* In practice, this is never needed. */ TYPE_CODE (type) = TYPE_CODE_METHOD; } diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 9ce920b..ddf4e7b 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -1235,7 +1235,8 @@ extern struct type *lookup_methodptr_type (struct type *); extern void smash_to_method_type (struct type *type, struct type *domain, struct type *to_type, struct field *args, - int nargs, int varargs); + int nargs, int varargs, + unsigned calling_convention); extern void smash_to_memberptr_type (struct type *, struct type *, struct type *); diff --git a/gdb/stabsread.c b/gdb/stabsread.c index 3b8eb29..02fac7e 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -1868,7 +1868,7 @@ again: return error_type (pp, objfile); type = dbx_alloc_type (typenums, objfile); smash_to_method_type (type, domain, return_type, args, - nargs, varargs); + nargs, varargs, 0); } break;