摘要 |
Integrating compiler warnings into a debug session including: receiving, by a debugger for a debug session of a debuggee from a compiler, compiled source code for execution and compiler warning data describing one or more compiler warnings generated at compile time of the debuggee, each compiler warning resulting from a source code variable statement in the debuggee source code; receiving, by the debugger, a request to evaluate a variable; determining, from the compiler warning data, whether evaluating the variable is dependent upon a source code variable statement resulting in a compiler warning; and, if evaluating the variable is dependent upon a source code variable statement resulting in a compiler warning, returning, by the debugger responsive to the request along with a result of the evaluation, a compiler warning indicator. |
主权项 |
1. A method of integrating compiler warnings into a debug session, the method comprising:
generating during compiling one or more compiler warnings, each compiler warning resulting from a source code variable statement; generating a symbol table with a plurality of records, each record representing a variable, the plurality of records including, for each variable having a source code variable statement that resulted in a compiler warning, a compiler warning flag and a warning description; embedding, in the compiled source code of the debuggee at a source code variable statement resulting a compiler warning for a variable, code that, when executed, sets a tag for the variable; embedding, in the compiled source code of the debuggee at a source code variable statement that does not result in a compiler warning for that variable, code that clears the tag for the variable; receiving, by a debugger for a debug session of a debuggee from a compiler, compiled source code for execution and compiler warning data describing one or more compiler warnings generated at compile time of the debuggee, each compiler warning resulting from a source code variable statement in the debuggee source code; executing, by the debugger, the debuggee including setting and clearing tags for variables; upon a stop in execution of the debuggee, identifying variables in the present debug scope having in the symbol table the compiler warning flag; receiving, by the debugger, a request to evaluate a variable; determining, from the compiler warning data, whether evaluating the variable is dependent upon a source code variable statement resulting in a compiler warning; and if evaluating the variable is dependent upon a source code variable statement resulting in a compiler warning, returning, by the debugger responsive to the request along with a result of the evaluation, a compiler warning indicator. |