You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To enable debugging, debug information is emitted along with the code. The debug information comes in two groups. There is a mapping between IL instruction offset to native instruction offset, and there is a mapping between a number that represents an argument/IL local to the native location. The latter is associated with a code range when the mapping is valid - (i.e. The compiler could optimize a variable's location away if it decides the value is no longer needed)
When the debuggee is stopped at a certain point, the register context can tell us where is the current program counter, we can use that to find out what method is being executed, then we can find out what IL offset is it using the native offset and then the mapping, then we can find out where the local variables are.
For disassembly inspection purposes, we can weave the IL instructions/C# source lines with the disassembly using the IL offset mapping, and we can also decorate the arguments/local variable access assembly code with the argument or local variable number/names.
The text was updated successfully, but these errors were encountered:
The work in #2067 improved the decoration significantly. Moving forward, it would be nice if we could decorate it with local names instead of local IDs.
To enable debugging, debug information is emitted along with the code. The debug information comes in two groups. There is a mapping between IL instruction offset to native instruction offset, and there is a mapping between a number that represents an argument/IL local to the native location. The latter is associated with a code range when the mapping is valid - (i.e. The compiler could optimize a variable's location away if it decides the value is no longer needed)
When the debuggee is stopped at a certain point, the register context can tell us where is the current program counter, we can use that to find out what method is being executed, then we can find out what IL offset is it using the native offset and then the mapping, then we can find out where the local variables are.
For disassembly inspection purposes, we can weave the IL instructions/C# source lines with the disassembly using the IL offset mapping, and we can also decorate the arguments/local variable access assembly code with the argument or local variable number/names.
The text was updated successfully, but these errors were encountered: