gdb下next,stepin,stepout

本文介绍了调试过程中常用的next、until和step指令,它们用于控制程序执行流程。next命令允许在不进入函数的情况下逐行执行,而until则能越过循环或函数,直到指定位置。step则能进入函数内部,尤其适用于有调试信息的函数。此外,还讨论了setstep-mod选项来调整无调试信息时的行为,并提供了查看当前模式的命令。
部署运行你感兴趣的模型镜像

next
指令格式next count | n count
count表示在最外层执行count行后停下.
遇到函数不会跳转进去.循环也会一次次的执行.

until | u
next的加强版,即使是for中也往下跳.
不过跳是执行完循环后的结果.
但是如果要退出,也会暂停.

until location
执行到对应地址后停止.如果无法到可能会退出程序或一直执行.

step
next的加强版,可以跳转到函数内部,前提是函数有对应的调试信息.

step count
重复执行count次 后停止,也会因为断点和信号暂停.

set step-mod on
没有调试信息也跳转,主要用于指令集别的调试.
set step-mod off
默认,没有调试信息就跳过.
show step-mod
查看跳转模式.

您可能感兴趣的与本文相关的镜像

ACE-Step

ACE-Step

音乐合成
ACE-Step

ACE-Step是由中国团队阶跃星辰(StepFun)与ACE Studio联手打造的开源音乐生成模型。 它拥有3.5B参数量,支持快速高质量生成、强可控性和易于拓展的特点。 最厉害的是,它可以生成多种语言的歌曲,包括但不限于中文、英文、日文等19种语言

:/mnt/hgfs/UbuntuShared/3.4rockx_face_camera_vi$ arm-linux-gnueabihf-gdb ./rockx_face_camera_vi GNU gdb (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36)) 8.2.1.20190227-git Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-pc-linux-gnu --target=arm-linux-gnueabihf". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://bugs.linaro.org/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ./rockx_face_camera_vi...done. (gdb) target remote 192.168.100.75:1234 Remote debugging using 192.168.100.75:1234 Reading symbols from /opt/rv1126_rv1109_linux_sdk_v1.8.0_20210224/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/arm-linux-gnueabihf/libc/lib/ld-linux-armhf.so.3...done. 0xa6ed0a00 in _start () from /opt/rv1126_rv1109_linux_sdk_v1.8.0_20210224/prebuilts/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/arm-linux-gnueabihf/libc/lib/ld-linux-armhf.so.3 (gdb) break main Breakpoint 1 at 0x11ddc: file rockx_face_camera_vi.cpp, line 76. (gdb) continue Continuing. warning: Could not load shared library symbols for 47 libraries, e.g. /oem/usr/lib/libeasymedia.so.1. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"? warning: Could not load shared library symbols for /usr/lib/libv4l/plugins/libv4l-mplane.so. Do you need "set solib-search-path" or "set sysroot"? [New Thread 1096.1913] Thread 1 "rockx_face_came" hit Breakpoint 1, main (argc=1, argv=0xaeb0ed24) at rockx_face_camera_vi.cpp:76 76 memset(&vi_chn_attr, 0, sizeof(VI_CHN_ATTR_S)); (gdb) next 77 vi_chn_attr.pcVideoNode = CAMERA_PATH; // Path (gdb) 78 vi_chn_attr.u32Width = 1920; // Width (gdb) next 79 vi_chn_attr.u32Height = 1080; // Height (gdb) next 80 vi_chn_attr.enPixFmt = IMAGE_TYPE_NV12; // ImageType (gdb) next 81 vi_chn_attr.enBufType = VI_CHN_BUF_TYPE_MMAP; // BufType (gdb) next 82 vi_chn_attr.u32BufCnt = 3; // Cnt (gdb) next 83 vi_chn_attr.enWorkMode = VI_WORK_MODE_NORMAL; // Mode (gdb) next 84 ret = RK_MPI_VI_SetChnAttr(CAMERA_ID, CAMERA_CHN, &vi_chn_attr); (gdb) next 85 if (ret) (gdb) next 87 printf("Vi Set Attr Failed.....\n"); (gdb) next 88 return 0; (gdb) next 92 printf("Vi Set Attr Success.....\n"); (gdb) next 95 ret = RK_MPI_VI_EnableChn(CAMERA_ID, CAMERA_CHN); (gdb) next [New Thread 1096.2089] [New Thread 1096.2090] 96 if (ret) (gdb) next 99 return 0; (gdb) next 103 printf("Vi Enable Attr Success.....\n"); (gdb) next 107 memset(&venc_chn_attr, 0, sizeof(VENC_CHN_ATTR_S)); (gdb) next 110 venc_chn_attr.stVencAttr.u32VirWidth = 1920; (gdb) next 111 venc_chn_attr.stVencAttr.u32VirHeight = 1080; (gdb) next 112 venc_chn_attr.stVencAttr.imageType = IMAGE_TYPE_NV12; (gdb) next 113 venc_chn_attr.stVencAttr.enType = RK_CODEC_TYPE_H264; (gdb) next [New Thread 1096.2167] 114 venc_chn_attr.stVencAttr.u32Profile = 66; (gdb) next 115 venc_chn_attr.stRcAttr.enRcMode = VENC_RC_MODE_H264CBR; (gdb) next 121 venc_chn_attr.stRcAttr.stH264Cbr.u32SrcFrameRateNum = 25; (gdb) next 122 ret = RK_MPI_VENC_CreateChn(VENC_CHN, &venc_chn_attr); (gdb) next 123 if (ret) (gdb) next 125 printf("ERROR: Create venc failed!\n"); (gdb) next 126 exit(0); (gdb) next 129 ret = RK_MPI_VI_StartStream(CAMERA_ID, CAMERA_CHN); (gdb) next 130 if (ret) (gdb) next 148 cerr<<"pthread create successed...."<<endl; (gdb) next 151 rockx_config_t *face_detect_config = rockx_create_config(); (gdb) next 152 ret=rockx_add_config(face_detect_config, ROCKX_CONFIG_DATA_PATH, "/userdata/rockx_data"); (gdb) next warning: Could not load shared library symbols for 6 libraries, e.g. /usr/lib32/librknn_runtime.so. Use the "info sharedlibrary" command to see the complete listing. Do you need "set solib-search-path" or "set sysroot"? [New Thread 1096.2250] 153 if (ret != ROCKX_RET_SUCCESS) (gdb) next 155 printf("Failed to add config: error code = %d\n", ret); (gdb) next 160 printf("Invalid parameter: check key or value\n"); (gdb) next 161 break; (gdb) next 163 printf("Memory allocation failed\n"); (gdb) next 164 break; (gdb) next 166 printf("类型不匹配 ...\n"); (gdb) next 175 printf("rockx_add_config successfully\n"); (gdb) next 178 rockx_handle_t face_detect_handle=NULL; (gdb) next 181 printf("第一处断点\n"); (gdb) next 183 rockx_module_t face_detect_module = ROCKX_MODULE_FACE_DETECTION_V2; (gdb) next 187 rockx_release_config(face_detect_config); // 释放配置 (gdb) next 188 printf("第三处断点\n"); (gdb) next 189 if (face_detect_ret != ROCKX_RET_SUCCESS) (gdb) next 191 printf("rockx_create face_detect failed...\n"); (gdb) next 192 return -1; (gdb) next 200 rv1126_rockx_image.width = WIDTH; (gdb) next 201 rv1126_rockx_image.height = HEIGHT; (gdb) next 202 rv1126_rockx_image.pixel_format = ROCKX_PIXEL_FORMAT_YUV420SP_NV12; (gdb) next 203 printf("Image params: width=%d, height=%d, format=%d\n", (gdb) next 206 rv1126_rockx_image.pixel_format); (gdb) next 203 printf("Image params: width=%d, height=%d, format=%d\n", (gdb) next 217 mb = RK_MPI_SYS_GetMediaBuffer(RK_ID_VI, CAMERA_CHN, -1); (gdb) next 218 if (!mb) (gdb) next 220 printf("Get Vi Stream break....\n"); (gdb) next 297 RK_MPI_VENC_DestroyChn(VENC_CHN); (gdb) next 298 RK_MPI_VI_DisableChn(CAMERA_ID, CAMERA_CHN); (gdb) next cv::String::String (this=0xaeb0ebe8, s=0x11cc3f "") at ./arm_opencv_source/include/opencv2/core/cvstd.hpp:599 599 if (!s) return; (gdb) next 601 if (!len) return; (gdb) next 603 } (gdb) next cv::String::~String (this=0xa2170b1c <__GI__IO_file_jumps>, __in_chrg=<optimized out>) at ./arm_opencv_source/include/opencv2/core/cvstd.hpp:646 646 String::~String() (gdb) next cv::String::~String (this=0x0, __in_chrg=<optimized out>) at ./arm_opencv_source/include/opencv2/core/cvstd.hpp:648 648 deallocate(); (gdb) next 649 } (gdb) next cv::String::operator= (this=0xa2170b1c <__GI__IO_file_jumps>, str=...) at ./arm_opencv_source/include/opencv2/core/cvstd.hpp:653 653 { (gdb)
最新发布
06-19
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值