Advertisement
poisonrush

GDB exception debugging C++

Jul 24th, 2019
2,829
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GDB 0.45 KB | None | 0 0
  1. If the code is throwing an exception and you want to catch at the point where the exception is thrown, use the below gdb commands:
  2. gdb <program_name>
  3. (gdb) catch throw
  4. Catchpoint 1 (throw)
  5. (gdb) run
  6. Thread 17 "test_unit_" hit Catchpoint 1 (exception thrown), 0x00007ffff78da8bd in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
  7. (gdb) where
  8. -------------------------------------
  9. stack trace follows
  10. -------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement