在linux如果我们需要用gdb启动程序加运行参数

普通启动程序  可执行程序 参数

root@B250M:~# ./SDK rtsp://192.168.2.38:5554/3

gdb 启动文件

root@B250M:~# gdb SDK
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 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 "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
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 SDK...done.
(gdb)

run/r 参数

(gdb) r rtsp://192.168.2.38:5554/3

或者 set args 参数

(gdb) set args rtsp://192.168.2.38:5554/3
(gdb) r
GitHub 加速计划 / li / linux-dash
6
1
下载
A beautiful web dashboard for Linux
最近提交(Master分支:4 个月前 )
186a802e added ecosystem file for PM2 4 年前
5def40a3 Add host customization support for the NodeJS version 4 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐