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: [PATCH] Fix "thiscall" method calling convention for inferior calls (PR15559)


>>>>> "Julian" == Julian Brown <julian@codesourcery.com> writes:

Julian> This is an adaptation of the patch in PR15559 that handles calling
Julian> inferior methods (on win32/mingw32) using the "thiscall" calling
Julian> convention -- i.e. with the "this" pointer in the ecx register. Instead
Julian> of attempting to detect the GCC version used to compile a particular
Julian> function/method to determine the calling convention to use (which didn't
Julian> seem to work well for me), I've introduced a new GNU-specific Dwarf code
Julian> to represent the calling convention in question.

Thanks.  I read through the patch and it all looks good to me.

Julian>     include/
Julian>     * dwarf2.h (enum dwarf_calling_convention): Add code for
Julian>     DW_CC_GNU_thiscall_i386.

This has to be approved on the gcc side, but then it is fine to import.
Or you can wait for one of my more or less random mass imports.

Julian>     gdb/
Julian>     * dwarf2read.c (dwarf2_add_member_fn): Add calling convention
Julian>     argument to smash_to_method_type call.
Julian>     (quirk_gcc_member_function_pointer): Likewise.
Julian>     (read_tag_ptr_to_member_type): Likewise.
Julian>     (smash_to_method_type): Add CALLING_CONVENTION argument. Initialise
Julian>     func-specific type for method types, and set the calling convention
Julian>     as appropriate.
Julian>     (init_type): Call INIT_FUNC_SPECIFIC for method types as well as
Julian>     function types.
Julian>     * gdbtypes.h (struct main_type): Adjust comment for FUNC_STUFF.
Julian>     (struct func_type): Adjust comment.
Julian>     * stabsread.c (read_type): Add dummy calling-convention argument to
Julian>     smash_to_method_type call.
Julian>     * i386-tdep.c (utils.h, infcall.h, dwarf2.h): Include files.
Julian>     (i386_push_dummy_call): Handle "thiscall" calling convention.

This is ok contingent on the gcc patch.

Tom


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