3 ms·
One thing I think is sorely lacking is approachable documentation for writing python extensions to GDB. I've managed to cobble together a collection of data st
by 01100011 3y ago
One thing I think is sorely lacking is approachable documentation for writing python extensions to GDB.
I've managed to cobble together a collection of data structure explorers written in Python but it is barely an improvement over straight gdb scripting due to the way all structs end up as dictionaries. Some higher level libraries for inspection might be nice. Automatic integration with something like graphviz would be amazing. For instance, it would be cool to just describe my data structure(specifying 'next' pointers or how to access edge lists for a graph) and just have a library dump a visual representation for me. That said, I wonder if half of that logic is best left in a debug module inside the application or library where it remains more tightly coupled to the actual layout.
- jaredsohn 3y agoChatGPT might work well for this.
- 01100011 3y agoFunny you say that. Literally the first thing I tried to get ChatGPT to do for me was to give me an example gdb extension written in Python. It hallucinated badly and as I pushed it, it produced increasingly erroneous errors. That was about 6-8 months ago though. It might be better now.
- jaredsohn 3y agoMake sure you try gpt4 if you didn't. I've had partial success in getting gpt4 to write rubocop cops (i.e. custom linting rules for ruby). I had to iterate a bit but eventually got something working and wouldn't have tried if I didn't have gpt helping me.
- 01100011 3y agoI think it was gpt3 at the time. I just tried 4 and it got it right!
- literalAardvark 3y ago3 is unusable and mostly just a curiosity. 4 is scary smart. There's 3 years between them. Bit worried about 2026.