Hacker News new | ask | show | jobs
by feelamee 501 days ago
> What features do you most miss?

one time I wanted to write generic printers. E.g. printer of any type which support C++ iterators. But gdb can't call C++ functions from python api (excepting weird hacks like evaluating `print c.begin()` and catching it output). Although this is not very useful because most of types we use changes very rarely, that's why writing printers is only matter of time.

Another feature is breakpoints which sleep next N seconds. We have breakpoints which can skip next N triggering, but similar with time will be useful to me to debug mouse events in gui apps, etc.

Also the most new gdb still have problems with tab-tab completion (and even Ctrl-C don't return control immediately).

Also lately I often meet problem cannot insert breakpoint 0. Probably this is a bug, because answers from stackoverflow isn't relevant for me

2 comments

> one time I wanted to write generic printers. E.g. printer of any type which support C++ iterators.

How would that work for types where the required functions are not instantiated, or not instantiated as a standalone function? Most iterators' operator++ are inlined and probably never instantiated as a distinct function.

> How would that work for types where the required functions are not instantiated

Obviously, it will not. But why not to try?)

> Most iterators' operator++ are inlined

Sure, it's sad.

But I'm still think that such feature - calling C++ functions from Python API - can be useful.

> excepting weird hacks like evaluating `print c.begin()` and catching it output)

Why do you consider that a weird hack instead of legitimate programming technique?

If this is not weird hack, why gdb provide api for getting C++ variables values instead of using this "legitimate programming technique"?