3 ms·
> I wish more back-end languages had this experience. the jvm debugging experience is pretty good imho. It's the compiled languages that have a poor experienc
by chii 3y ago
> I wish more back-end languages had this experience.
the jvm debugging experience is pretty good imho.
It's the compiled languages that have a poor experience with debugging - try injecting code to execute in a c debugger! It's hard as hell to do!
- bpye 3y agoYou know the tooling leaves something to be desired when editing instruction bytes is the best option to NOP out an assert - for example.
- saagarjha 3y agoGenerally a conditional breakpoint is good enough to do this (though perhaps not very fast).
- jeroenhd 3y ago> try injecting code to execute in a c debugger! It's hard as hell to do! I mean, theoretically, not really? Allocate a page RW, put in some compiled code, remap as R+X, redirect execution there, return code execution to where it was. Jumping through those hoops will be more expensive when you use the debugger like that (you'd need to hot patch some kind of jump statement to circumvent that) but it's not exactly impossible. Things become difficult when the compiler starts optimizing out code, because the debugger would need to keep track of everything, but I don't see why it'd be technically impossible to do so. Executing code in a C debugger is basically how modern reverse engineering works, it's a lot harder than in other languages but it's certainly possible.
- saagarjha 3y agoYeah, both GDB and LLDB know how to do this.