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; } 

enter image description here

this this libstdc++ pretty printers bug.

you can apply this patch installed pretty printers or update whole gcc more recent version.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -