3 ms·
Perhaps I wasn't clear. None of things I mentioned would entail changing the generated code in any way. In the comment about omniscience, here's an example of
by roca 7y ago
Perhaps I wasn't clear. None of things I mentioned would entail changing the generated code in any way.
In the comment about omniscience, here's an example of what I'm proposing:
-- Debuginfo says variable 'x' is in register R1 in the PC range 0-10
-- At 10, R1 is set to something unrelated
-- Debuginfo says in the PC range 10-20, 'x' is equal to its last live value (i.e. its value at PC=10)
Pernosco would evaluate the value of 'x' at PC=15 by actually reconstructing the value in R1 at PC=10, using the omniscient database we already have.
Of course DWARF can't currently express this, because normal debuggers can't make use of it. Even in rr it would be quite expensive to compute.
If you're familiar with DW_OP_entry_value, it's a bit like that. That's a way for DWARF to say "the value of this variable (e.g. a parameter) is equal to the value of this subexpression (usually a register) on entry to the function", which regular debuggers can often obtain using stack unwinding. Pernosco doesn't do the unwinding, instead it (logically) warps back in time to the point where the function was called and evaluates the subexpression in that context.
- pizlonator 7y agoGotcha. I get what you’re saying now: you just replay and it’s all good.