304900e765
Currently one instruction can correspond to multiple sequence points because of inlining. This leads to a bad user experience as only the last one is used. In this commit we create a sequence point for each inlined call and also make sure that each time a new sequence point is created the corresponding opcode can easily be seen in code. The NOPs increase contract size, but not to a large degree. Other solutions considered: 1. Discard NOPs if a special flag is provided. Still leads to bad debugging experience if deployed contract differs from the debugged one. 2. Create an issue for a debugger. When multiple sequence points are provided for a single instruction they can be used to emulate non-inline behaviour with pseudo-NOPs. I believe this is what windows debugger does (the last paragraph https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/debugging-optimized-code-and-inline-functions-external ) 3. Emit debug info for inlined functions even without creating a function in the NEF itself. This should be done for each called instance and would also create overlapping opcode ranges for the enclosing function. However this approach can also ensure consistent values view for inlined function parameters. Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru> |
||
---|---|---|
.. | ||
compiler | ||
config | ||
consensus | ||
core | ||
crypto | ||
encoding | ||
interop | ||
io | ||
neotest | ||
network | ||
rpc | ||
services | ||
smartcontract | ||
util | ||
vm | ||
wallet |