Hello all-
I’m planning on merging the work in progress debugger into master in the coming days. A prior version of this code has been reviewed and it is my understanding from Mateusz that there were 1 or 2 unaddressed items. I’ve addressed one (handling of multiple offsets for a given line) and don’t think the other item (in what file a particular set of functions belongs) makes sense at the moment, based on my read of the code. I wouldn’t however, be opposed to someone who feels more strongly about relocating it. I’ve made a few other minor enhancements to the C-level code that I don’t think negatively impact the outcome of that review.
The first thing to know is that the debugger actually works[1].
My plan is to split the code into 2 or 3 parts: the C-level bits, the debugger itself which lives in lib/modules/Debug/Debugger.pmod and the bootstrap code in master.pike. When it lands, I’ll also have some instructions for how to try it out.
My base assumptions (hopefully obvious but I’ll state them nonetheless):
1. When not enabled at runtime, it is intended that the code is not in the path of execution. 2. When enabled, the code should not cause aborts. 3. "Surprise" behavior is possible, some of which is known[2] and some not. 4. Performance is assumed to be impacted while debugging. Attempts to minimize the negative impact are obviously of interest. 5. Everything here is private/uncommitted and subject to change should something better rear its head.
Some caveats:
0. This is very much work in progress, but I commit to minimize impact to others and get things to a point where that’s no longer the case as quickly as possible. I felt it important to get this code out in front of more people to look at and try.
Specifically:
1. I’ve made a good faith effort to not commit known bugs, but I’m sure there are some and will investigate any problems identified. 2. There is vestigial code that I’ve left in place to ease the inevitable troubleshooting and confidence building that are coming. The plan is to remove them when they are no longer needed. 3. There is behavior that might be pared back (specifically related to breakpoints across a range of offsets, which may not be needed). 4. The Pike level code is where most of the action currently is, and is most likely to see major change. 5. Semi-related: there /seems/ to be a problem in LiveBacktraceFrame in that argument names aren’t available, and it appears they’re not making it out of the compiler intact. I haven’t been able to track down the source of that problem. Assistance would be welcome.
If anyone sees a major problem in any of this, please let me know.
Bill
[1] http://wiki.gotpike.org/PikeDevel%2FPikeDebugger [2] http://wiki.gotpike.org/index.pike?page=PikeDevel/PikeDebuggerCaveats (will be in place by tomorrow)
Reference 2 should actually be the following URL, which was already in place save for some formatting:
https://hg.sr.ht/~hww3/vscode-debugger-pike
On 2021-03-16 10:41, H William Welliver wrote:
pike-devel@lists.lysator.liu.se