@ollydbg: Yes, my pretty printer works best (or only ) with your patched gdb.
Did you test some uninitialzed C++ container as local variables. E.g.
void f()
{
int a;
vector<string> b;
....Some statement;
map<string,string> c;
}
If you set a breakpoint in the first line of "f", then "b" and "c" are uninitialized variables, they will cause the python pretty printer try to print a large number of elements. Sometimes, it will take a long time, sometime, gdb may crash. Currently no good way to detect a variable is initialized or not. If not, it may have some corrupt values, as the constructor of the container is not called, mayb, the size of the container may be a large value.
If I knew a way to iterate all symbols of a frame in python, I would not just call "info local".
But in my opinion, gdb pretty printers must be able to deal with arbitrary/corrupt data.
If a pretty printer crashes/turns into an infinite loop/takes too long to complete when handed some arbitrary bytes, then that pretty printer is buggy and needs to be fixed or disabled:
One of the main points in debugging is to inspect data corruption bugs.
I have asked such question in gdb maillist, but it looks like there is no quick solution/fix to handle this issue. Mostly I think the c-runtime-library should fill the memory with some value like "0xCDCDCDCD", and gdb try to exam its value when it want to deference a pointer.....