From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2710 invoked by alias); 19 May 2014 14:50:46 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2692 invoked by uid 89); 19 May 2014 14:50:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,KAM_ADVERT2,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 May 2014 14:50:44 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4JEofvK032720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 19 May 2014 10:50:41 -0400 Received: from barimba (ovpn-113-182.phx2.redhat.com [10.3.113.182]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4JEoZbl019937 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Mon, 19 May 2014 10:50:36 -0400 From: Tom Tromey To: Julian Brown Cc: Subject: Re: [PATCH] Fix "thiscall" method calling convention for inferior calls (PR15559) References: <20140326132302.09b6fc35@octopus> Date: Mon, 19 May 2014 14:50:00 -0000 In-Reply-To: <20140326132302.09b6fc35@octopus> (Julian Brown's message of "Wed, 26 Mar 2014 13:23:02 +0000") Message-ID: <877g5hzutg.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-05/txt/msg00350.txt.bz2 >>>>> "Julian" == Julian Brown 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