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]

[patch] Set calling convention of methods


Hello,

In attachment is my patch to set the calling convention for methods. Since the calling convention cannot be defined using stabs, I've hardcoded "0" there (which means that nothing changes compared to the past). Maybe that should rather be some constant? If so, where should it be defined?

The patch is against the "archer" branch of Archer (not the master branch as I wrote earlier), but it applies cleanly against CVS head with only a bit of fuzz (and compiles). I have tested it in Archer in combination with an improved version of my Borland fastcall patch (which Mark Kettenis kindly offered to review) and some small changes in p-exp.y, and can successfully call both regular and virtual Free Pascal methods with it that use the Borland fastcall calling convention.

Thanks,


Jonas


2009-04-06 Jonas Maebe <jonas.maebe@elis.ugent.be>

Set the type.type_specific.calling_convention field for methods.

* gdbtypes.h (smash_to_method_type): Add calling_convention parameter.
* gdbtypes.c (smash_to_method_type): Set method calling convention based
on calling_convention parameter.
* dwarf2read.c (dwarf2_add_member_fn): Pass calling convention to
smash_to_method_type().
(quirk_gcc_member_function_pointer): Likewise.
* stabsread.c (read_type): Pass 0 (== default) as calling convention to
smash_to_method_type().


Attachment: gdb_method_calling_conventions.patch
Description: Binary data



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