Skipping over trampolines/stubs

Jonas Maebe jonas.maebe@elis.ugent.be
Wed Apr 1 20:15:00 GMT 2009


On 01 Apr 2009, at 21:14, Daniel Jacobowitz wrote:

> On Wed, Apr 01, 2009 at 09:08:11PM +0200, Jonas Maebe wrote:
>>>
> GDB already supports this for other languages; I suggest just adding
> detection of the Free Pascal stubs to the debugger.  ObjC and C++
> both have similar requirements, I believe.  In C++ they're virtual
> call thunks.

Thanks. Given that tracing some of these stubs requires access to the  
parameters, I should start with adding support for the Borland  
fastcall calling convention to gdb. The reason is that this is our  
default calling convention on i386 platforms, mainly for Delphi  
compatibility reasons (quite a bit of unparametrised assembler code  
there).

Which brings me to the next point: how does one go about "allocating"  
a new DW_AT_calling_convention value in the DW_CC_lo_user ..  
DW_CC_hi_user range? At first sight, there is only one such value  
currently in public use (DW_CC_GNU_renesas_sh). Can I just take 0x41  
for DW_CC_BORLAND_fastcall_i386? And should I then submit this  
constant for inclusion in binutils first?


Jonas



More information about the Gdb mailing list