调试的指令很简单: 
cd $CAFFE_ROOT, 
1. gdb ./build/tools/caffe 
2. 设置运行参数 set args train --solver=xxxxsolver.prototxt 
3. 设置断点, 比如b solver.cpp:59 , 此时会出现“Make breakpoint pending on future shared library load? (y or [n]) ”, 选择y即可,因为断点设置在.so文件中 
4. run 即可

 

通过python进入shared_library,也就是调试python调用c++的c++代码端的方法:

 gdb --args python test.py

相关文章:

  • 2021-07-25
  • 2021-12-09
  • 2021-06-13
  • 2021-07-05
猜你喜欢
  • 2021-08-06
  • 2022-02-22
  • 2021-11-09
  • 2021-12-16
相关资源
相似解决方案