From: Tom Tromey <tromey@redhat.com>
To: Julian Brown <julian@codesourcery.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix "thiscall" method calling convention for inferior calls (PR15559)
Date: Mon, 19 May 2014 14:50:00 -0000 [thread overview]
Message-ID: <877g5hzutg.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20140326132302.09b6fc35@octopus> (Julian Brown's message of "Wed, 26 Mar 2014 13:23:02 +0000")
>>>>> "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
prev parent reply other threads:[~2014-05-19 14:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-26 13:23 Julian Brown
2014-03-26 13:26 ` Julian Brown
2014-05-19 14:50 ` Tom Tromey [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877g5hzutg.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=julian@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox