gdb使用记录

ubuntu 下sh gdb 调试脚本示例

#!/bin/bash
export LD_LIBRARY_PATH=/home/ubuntu/IllegalRecorder/test/lib:$LD_LIBRARY_PATH

export LD_LIBRARY_PATH=../lib/3rdParty/opencv-3.4.10/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/caffe/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/darknet/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/protobuf/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/cuda/lib64:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/atlas/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/boost_1_59_0/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/cairo/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/freetype/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/gflags/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/glog/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/rapidjson/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/xlnt/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/zlog/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/libFaceCom190610/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/libtorch/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/NumCpp/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/oplib/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/redis_bintest/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=../lib/3rdParty/redisLib:$LD_LIBRARY_PATH

tool=./redis
deviceId=0
modelPath=../lib/models
videoPath=../video/data
savePath=../result
plateNum=Nanchang
labelType=IllegalParking
uuid="abcd"
redisip=192.168.10.111
./redis $deviceId $modelPath $videoPath $savePath $plateNum $labelType $uuid
gdb ./testcase
# set args 0 ../lib/models /data/vir_300/result/algRes/ /data/vir_300/result/roiRes/ 0 192.168.70.24
  1. file 可执行文件
  2. 输入参数: set args arg0 arg1 arg2
    3.常见的终端输入指令:
      r --run
     s --stop
     c --continue
     b --设置断点 b 编译路径.cpp:行号 
    eg:b /data_1/project/nanchang/IllegalRecorder/test/model/classification/testcar.cpp:23
    设置了断点,下一步就是用r或者run命令执行被调试的程序,执行后会自动在第一个断点处停下来
     info b --显示所有的断点信息
     bt --显示帧栈
     next –
     step – next 和step 单步调试的意思,两者的区别是next遇到函数不会进入函数内部,step会执行到函数内部。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值