I have a C++ program that calls a large library of functions. I have built it and can execute it successfully from the command line in ubuntu. I would like to step through the code in order to see what is going on in some of the functions that it calls. I am using gdb to do this. However, at a certain point in the code gdb reports a "terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc".
How come the code can execute on the command line, but terminates in gdb?