CppCon 2019: Modern C++ debugging tools

Greg Law

gdb

  • ptrace()
  • signals ony reach the tracee via PTRACE_COUNT
  • breakpoints and single step are SIGTRAPs
  • ^C is SIGINT
  • modify instruction causes SIGTRAP

DWARF

g++ -g3??? ; helps make inline functions not look inline; macros

  • “Optomized out” really means it’s just later
  • readelf —dump-debug
  • can actually track registers while live
  • Call frame analysys
  • Catch throw or catch
  • Libthreddb

address Sanitizer

Malloc and free are intercepted. Shadow memory keeps track

Replay

Record and replay nondeterministic steps. Just Re execute to get to current point

Static analysis

What’s The best way for a c++ programmer to make money? Inheritance

Synopsis

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.