GDB seems to always just work for C programs, but for C++ I often get these cryptic stacks:
(gdb) bt
#0 0x08055fa4 in std::runtime_error::what ()
#1 0x080576c8 in std::runtime_error::what ()
#2 0x08057dda in std::runtime_error::what ()
#3 0x080580d2 in std::runtime_error::what ()
#4 0x08058662 in std::runtime_error::what ()
#5 0x08058725 in std::runtime_error::what ()
#6 0x0806ef7a in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string<char*> ()
#7 0x00c0adec in __libc_start_main () from /lib/libc.so.6
#8 0x0804d011 in std::runtime_error::what ()
Which on the surface offer absolutely no clues as to where the problem occurred. Is there anyway to get more information out of such a core file - or make the program dump something more useful?