gdb的user-define command
搜索: user-defined
例子。 # save this file in ~/.gdb or some where easy to find.
# then in ~/.gdbinit add the following line...
# source ~/.gdb/osip_gdb_util
#
# help p_osip_list_size
# help p_osip_list define p_osip_list_size
set $list = ($arg0)
set $list_size = 0
set $node = $list->node
while ($node != 0)
set $list_size++
set $node = (__node_t *)$node->next
end printf "List size: %d", $list_size
end
document p_osip_list_size
p_osip_list_size <list>: Print size of osip list
end define p_osip_list
set $list = ($arg0)
set $list_size = 0
set $node = $list->node
while ($node != 0)
set $list_size++
print $node->element
set $node = (__node_t *)$node->next
end
end
document p_osip_list
p_osip_list <list>: Prints the content of the list.
To see the value, cast the information back to the original form.
For example: *(osip_generic_param_t)$1
end
gdb的user-define command的更多相关文章
- gdb中的define命令
可以使用define命令达到类似于display的效果:比如每ni后显示当前5条指令: define s5 ni x/5i $pc end 甚至可以手动传入要显示指令的条数: define s ni ...
- J-Link GDB Server Command
J-Link GDB Server - SEGGER Hilden, Germany – September 15th, 2011 – SEGGER Microcontroller today ann ...
- GDB配置与.gdbinit的编写
GDB配置与.gdbinit的编写 当 GDB(即 GNU Project Debugger)启动时,它在当前用户的主目录中寻找一个名为 .gdbinit 的文件:如果该文件存在,则 GDB 就执行该 ...
- gdb 调试学习
gdb 是unix/linux 系统下的程序调试工具,和IDE(如VS, Eclipse等)的图形化调试工具相比,gdb在断点,跟踪显示方面有着不足,但是它在某些方面比图形化调试工具更加丰富的功能. ...
- [转]Building a Basic Fuzzer with GDB: The Five Minute GDB Scripting Tutorial
link:http://www.praetorian.com/blog/building-a-basic-fuzzer-with-gdb-the-five-minute-gdb-scripting-t ...
- 用gdb理解C宏(#和##)
在Unix/Linux内核代码以及GNU libc源代码中,有两个C的宏被广泛使用. 例如: /* glibc-2.25/sysdeps/powerpc/powerpc64/sysdep.h */ # ...
- gdb help all 帮助信息
Command class: aliases ni -- Step one instruction rc -- Continue program being debugged but run it i ...
- 用 set follow-fork-mode child即可。这是一个 gdb 命令,其目的是告诉 gdb 在目标应用调用fork之后接着调试子进程而不是父进程,因为在 Linux 中fork系统调用成功会返回两次,一次在父进程,一次在子进程
GDB的那些奇淫技巧 evilpan 收录于 Security 2020-09-13 约 5433 字 预计阅读 11 分钟 709 次阅读 gdb也用了好几年了,虽然称不上骨灰级玩家,但 ...
- arcmap Command
The information in this document is useful if you are trying to programmatically find a built-in com ...
- GDB 多进程调试
启动: $gdb <file> || $gdb 然后(gdb)file <file> 运行: (gdb)run <该程序本身的命令行参数> 查看代码: (gdb) ...
随机推荐
- skynet配置文件
启动skynet需要一个配置文件 我们看下examples/config root = "./" 表示根目录是skynet启动时的目录thread = 8 ...
- 解决Eclipse下第三方库无法导航源代码
写在前面(的废话):Eclipse无法导航代码,存在的可能性非常多,这里我们只讨论在引用第三方库时无法导航的情况,是一个很简单的Case,但是搜索能力好像不太及格,没找到一针见血的方案,于是自己研究了 ...
- C语言 —— 括号配对问题(不使用栈)
最近在南阳理工的OJ上刷题,看到一个有点意思的题目 网上的答案大多都使用了栈,可惜我还没有学习数据结构,所以只能用简单的方法来解决 题目的链接在这 http://acm.nyist.net/Judge ...
- <!DOCTYPE html>
html5标准网页声明,原先的是一串很长的字符串,现在是这个简洁形式,支持html5标准的主流浏览器都认识这个声明.表示网页采用html5.
- 解决 MySQL manager or server PID file could not be found! 的方法
[root@centos var]# service mysqld stop MySQL manager or server PID file could not be found! [F ...
- SQL分类取每一类第一项
实际应用中经常会碰到这样的需求,在给定的数据集中要求返回每一类型中最大的一条,抑或是最小的一条,抑或是按时间排序最近的一条等等.很多人面对这样的需求显得束手无策,其实这个需求实现有很多种方法,今天给大 ...
- Spring、Bean 的作用域
Singleton作用域(默认) 当一个bean的作用域为singleton,那么Spring Ioc容器中只会存在一个共享的bean实例,并且所有对bean的请求,只要id与该bean定义相匹配,则 ...
- DOM注意事项(八):JavaScript操作环境和垃圾收集
一.运行环境 在约JavaScript对象或this当指向问题,念就是运行环境.即上下文环境.运行环境在JavaScript是一个非常重要的概念.由于它定义了变量或函数有权訪问的其他数据,决定了它们各 ...
- SVN报错:can't open file db/txn-current-lock:permission denied 解决方法
其实这个问题是这样的.下面我举个例子:比如版本库SVN是root用户创建的但是启动服务的时候没有选择root启动,而是在其他用户转托管太下启动的,所以只能读不能写. 解决方法:停止svn服务:kill ...
- tmux 命令
创建并指定session名字tmux new -s $session_name 删除sessionCtrl+b :kill-session 临时退出sessionCtrl+b d 列出sessiont ...