1 // Helper functions for running the type-names.rs test under CDB
3 // CDB exposes an "object model" via JavaScript that allows you to inspect debugging info - in this
4 // case we want to ask the object model for the return and parameter types for a local variable
5 // that is a function pointer to make sure that we are emitting the function pointer type in such a
6 // way that CDB understands how to parse it.
10 function getFunctionDetails(name)
12 var localVariable = host.currentThread.Stack.Frames[0].LocalVariables[name];
13 var functionPointerType = localVariable.targetType.genericArguments[0];
14 var functionType = functionPointerType.baseType;
15 host.diagnostics.debugLog("Return Type: ", functionType.functionReturnType, "\n");
16 host.diagnostics.debugLog("Parameter Types: ", functionType.functionParameterTypes, "\n");