Fw: Extending calling convention information in DWARF output for x86

Roger Cruz roger_r_cruz@yahoo.com
Wed Jun 6 13:43:00 GMT 2012




I am interested in parsing DWARF debug output in order to know the calling convention of each function.  Reading the spec for DWARF-4, I can see that there is an attribute DW_AT_calling_convention but its only defined values are (pg 52):

DW_CC_normal
DW_CC_program
DW_CC_nocall


The spec also allows compilers to generate their own extensions (pg 153) which can be used to enhanced that attribute's information.

My questions are:  Is there a way to coax GCC to use these extensions to spell out the calling convention for each function for an x86 target?  If not, has anyone added these extensions for other targets which I can use to add support for x86?  Can someone estimate how big of an effort it would be for someone who has no knowledge of GCC's internals but may be able to use another target as a template?


Regards,

Roger R. Cruz



More information about the Gcc mailing list