This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug c++/15559] Method call and calling convention
- From: "asmwarrior at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sat, 01 Mar 2014 14:23:37 +0000
- Subject: [Bug c++/15559] Method call and calling convention
- Auto-submitted: auto-generated
- References: <bug-15559-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=15559
--- Comment #16 from asmwarrior <asmwarrior at gmail dot com> ---
(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.