Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to set regex breakpoint for shared library in GDB

📅 2017-Aug-22 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ breakpoint, gdb, regex ⬩ 📚 Archive

Problem

Assume you are running a program under GDB and it is linked to shared library files. Not all the shared libraries are loaded at the beginning when you start the program with GDB. They are loaded when needed. So, how to set a regex breakpoint in a source file that belongs to one of the shared library files?

Solution

Tried with: GDB 7.11.1 and Ubuntu 14.04


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧