Fixed debugstack tracking issue.
Fixed missing local function pointer variable declarations.