From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17136 invoked by alias); 1 Mar 2014 14:23:41 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 17102 invoked by uid 48); 1 Mar 2014 14:23:40 -0000 From: "asmwarrior at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/15559] Method call and calling convention Date: Sat, 01 Mar 2014 14:23:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: 7.6 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: asmwarrior at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q1/txt/msg00317.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=15559 --- Comment #16 from asmwarrior --- (In reply to Domani Hannes from comment #15) > Hello asmwarrior > > Yes, looks like my strategy doesn't work in every situation. > find_pc_function() can fail (maybe because of some missing debug > information?), then it just stops looking. > A minimal_symbol would still be available, but it's not really useful for > this situation. > > I looked at your code again as well. > find_pc_symtab(find_function_addr(function,NULL)) would work as well, so we > don't need that global i386_windows_build_gt_gcc46. Hi, Domani Hannes, thanks, this can simplify my original patch, so I don't need to touch the infcall.c now, I have tested the new way you suggested, and it works fine. I will upload the new patch (version 3) of my patch soon. > > But I found no way to locally find out if it's a static function. > There is function->type->main_type->flag_static, but it's always 0 (and as > far as I can tell not used). So, we can't use this flag. Currently, in my patch, whether a function is a static member function is retrieved from gdb/eval.c, but I don't see it use the function->type->main_type->flag_static either. In infcall.c, it use a function to get whether a function is static: (void) find_overload_match (&argvec[1], nargs, tstr, METHOD, /* method */ &arg2, /* the object */ NULL, &valp, NULL, &static_memfuncp, 0); But the function find_overload_match is quite complex, I don't dig enough to its body, it looks like in int find_overload_match (struct value **args, int nargs, const char *name, enum oload_search_type method, struct value **objp, struct symbol *fsym, struct value **valp, struct symbol **symp, int *staticp, const int no_adl) { There are two places to update the *staticp. Yuanhui Zhang (asmwarrior) -- You are receiving this mail because: You are on the CC list for the bug.