I tried using single quotes as well, but it still won't print the
value: p (('std::_List_node' *) $curNode)->_M_data
No symbol "std::_List_node" in current context.
Your planned usage of gdb is pretty ambitious. As far as I can tell,
it's never supported such sophistication. Any non-trivial scoping seems
to fail.
If you are debugging on linux, you might try compiling with the flags
"-ggdb3 -O0".
Do I need to the type of list entries I'm trying to print? I'm
trying to create a user-defined command in gdb for printing stl lists
so I'd rather keep the command general so that I could reuse this
command for any other lists I might want to print.
In a perfect world, some theoretical future gdb would allow you to use
std::list's own member functions for access.
-benjamin