typedef enum TRAMP_e { // Trampoline subtype
trampIncremental, // incremental thunks
trampBranchIsland, // Branch island thunks
} TRAMP_e;
typedef struct TRAMPOLINESYM { // Trampoline thunk symbol
unsigned short reclen; // Record length
unsigned short rectyp; // S_TRAMPOLINE
unsigned short trampType; // trampoline sym subtype
unsigned short cbThunk; // size of the thunk
CV_uoff32_t offThunk; // offset of the thunk
CV_uoff32_t offTarget; // offset of the target of the thunk
unsigned short sectThunk; // section index of the thunk
unsigned short sectTarget; // section index of the target of the thunk
} TRAMPOLINE;
The definition is sourced from
microsoft-pdb
:The test comes from the last trampoline symbol in https://github.com/mstange/pdb-addr2line/issues/52#issuecomment-1130225425.
Fixes https://github.com/willglynn/pdb/issues/123