4 ms·
I use gdb as a C REPL. You attach it to a binary that has the functions you need, then you can use them with the `p` (or `print`) command. Loops and new functio
by yorwba 10y ago
I use gdb as a C REPL. You attach it to a binary that has the functions you need, then you can use them with the `p` (or `print`) command. Loops and new function definitions are not possible, but sometimes it's still good enough.
- pjmlp 10y agoThat is how I once developed a B+ Tree library for low level disk blocks back in 1996, it was quite helpful tracking down how the nodes were being used.
- RhysU 10y agoGdb as REPL is a nice trick. Beaker Notebook might give the notebook parent wants for C work.
- photojosh 10y agoThanks. It won't since all my C work is embedded and mainly systems programming rather than algorithms. But I'll keep it in mind for the next time I have to translate my Python explorations over to C for production.
- photojosh 10y agoGood point. I've only been working with AVRs for a few years since I've been at this job, but looks like it might be doable. Thanks for the tip.