c++ - gdb pretty printer stops working if I rerun my program -
if use command run inside gdb rerun program can no longer pretty print c++ objects vectors:
$ gdb ./some_program (gdb) br some_where (gdb) run (gdb) print some_vector # vector pretty printed (gdb) run (gdb) print some_vector # vector no longer pretty printed here's sample code used , actual gdb session:
#include <vector> #include <iostream> using namespace std; int main() { vector<int> v{1}; cout << v[0] << endl; }
this this libstdc++ pretty printers bug.
you can apply this patch installed pretty printers or update whole gcc more recent version.

Comments
Post a Comment