当前位置:网站首页>GDB debugging practice (8) transfer startup parameters to the program
GDB debugging practice (8) transfer startup parameters to the program
2022-06-21 22:18:00 【Wonderful binary】
occasionally , Our debugger needs to accept input parameters from the command line , Let's see gdb How to pass startup parameters to a debugger .
Sure stay gdb Startup time , Specify the parameters of the debugged program through options , for example :
$ gdb -args ./a.out a b c
It can also be in gdb in , Set by command , for example :
(gdb) set args a b c
(gdb) show args
Argument list to give program being debugged when it is started is "a b c".
You can also run the program , Direct designation :
(gdb) r a b
Starting program: /home/xmj/tmp/a.out a b
(gdb) show args
Argument list to give program being debugged when it is started is "a b".
(gdb) r
Starting program: /home/xmj/tmp/a.out a b
It can be seen that , The parameters have been saved , Run directly the next time run command , that will do .
Intentionally , If I go on , Want the parameter to be empty , What should I do ? Yes , direct :
(gdb) set args
边栏推荐
- 利用for循环,分别计算1-100中奇数的和、偶数的和【方法一】
- How to write the title of popular popular items in our media video
- 【深入理解TcaplusDB技术】TcaplusDB构造数据
- [deeply understand tcapulusdb technology] one click installation of tmonitor background
- 迅为iTOP-3568开发板安装 RKNN Toolkit Lite2
- 洛谷P1514 [NOIP2010 提高组] 引水入城 题解
- 先进封装,一个大周期的开始——“迎风国潮”半导体设备研讨会
- HiCPlotter|HiC数据可视化工具
- I2C【1】-I2C驱动调试读操作异常的bug
- A callback was made to a garbage collected delegate of type "xxx:: invoke". This can cause application crashes, corruption, and data loss. When passing delegates to unmanaged code, the managed applica
猜你喜欢
随机推荐
利用while循环,分别计算1-100中奇数的和、偶数的和【方法一】
Implement a middleware from -1
InstaDeep Ltd:Arthur Flajolet | 单机上基于群体的快速强化学习
Advanced packaging, the beginning of a big cycle -- a symposium on semiconductor equipment
Six interesting web page effects that can be used
Ruiji housekeeper, a century old classic, is waiting for your elegant journey to start again
Luogu p1514 [noip2010 improvement group] water diversion into the city
Enzo high sensitivity detection Arg8 vasopressin ELISA Kit
Yi Li, head of Alibaba cloud container service: how does cloud origin solve the problem of reducing costs and improving efficiency?
dotter|打点法进行序列两两比较软件
What is the execution order of JS asynchronism
中国工程院院士郑纬民:我对中国在下一个 IT 时代拥有一席之地很乐观
新能源行业商业采购协同系统:赋能新能源行业采购业务,提升产业协同
Notes on question brushing (17) -- binary search tree: about attribute problems
Dotter| dot method sequence pairwise comparison software
Font size in DataGridView of C #
刷题笔记(十六)--二叉树:修改与构造
央企国电集团上海翔伟机电和中外海达成战略合作,捐赠2亿
赋·新生,链·未来!城链科技产业赋能创新发展大会隆重举行
Use the for loop to calculate the odd and even sums in 1-100 [method 2]









