poisonrush

GDB exception debugging C++

Jul 24th, 2019
598
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. -------------------------------------
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×