I wrote a little unit test framework that uses python to dynamically loaded shared libraries and invoke test methods on them. I am able to invoke unit tests through my build scripts by executing:
make test_library
Make then spawns python with a script that invokes my test methods. This works great but I am having trouble setting it up with GDB so that I can invoke the same make target but and have GDB break when my library test code is reached. Any suggestions on how to best go about it? This is all on linux.
Thanks
There are several approaches.
You can
gdb myprog < myscript
gdb source myscript
etc
Here's a link on GDB commands:
Here's a good GDB cheat sheet:
Here's a specialized technique ("hooks") that might also be applicable:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With