搜索: 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的更多相关文章

  1. gdb中的define命令

    可以使用define命令达到类似于display的效果:比如每ni后显示当前5条指令: define s5 ni x/5i $pc end 甚至可以手动传入要显示指令的条数: define s ni ...

  2. J-Link GDB Server Command

    J-Link GDB Server - SEGGER Hilden, Germany – September 15th, 2011 – SEGGER Microcontroller today ann ...

  3. GDB配置与.gdbinit的编写

    GDB配置与.gdbinit的编写 当 GDB(即 GNU Project Debugger)启动时,它在当前用户的主目录中寻找一个名为 .gdbinit 的文件:如果该文件存在,则 GDB 就执行该 ...

  4. gdb 调试学习

    gdb 是unix/linux 系统下的程序调试工具,和IDE(如VS, Eclipse等)的图形化调试工具相比,gdb在断点,跟踪显示方面有着不足,但是它在某些方面比图形化调试工具更加丰富的功能. ...

  5. [转]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 ...

  6. 用gdb理解C宏(#和##)

    在Unix/Linux内核代码以及GNU libc源代码中,有两个C的宏被广泛使用. 例如: /* glibc-2.25/sysdeps/powerpc/powerpc64/sysdep.h */ # ...

  7. gdb help all 帮助信息

    Command class: aliases ni -- Step one instruction rc -- Continue program being debugged but run it i ...

  8. 用 set follow-fork-mode child即可。这是一个 gdb 命令,其目的是告诉 gdb 在目标应用调用fork之后接着调试子进程而不是父进程,因为在 Linux 中fork系统调用成功会返回两次,一次在父进程,一次在子进程

    GDB的那些奇淫技巧 evilpan 收录于 Security  2020-09-13  约 5433 字   预计阅读 11 分钟  709 次阅读  gdb也用了好几年了,虽然称不上骨灰级玩家,但 ...

  9. arcmap Command

    The information in this document is useful if you are trying to programmatically find a built-in com ...

  10. GDB 多进程调试

    启动: $gdb <file>  || $gdb 然后(gdb)file <file> 运行: (gdb)run <该程序本身的命令行参数> 查看代码: (gdb) ...

随机推荐

  1. Service(Local Service)简介

    一.Service的作用 主要用于在后台处理一些耗时的逻辑操作,或者去执行某些长期运行的操作. 二.Service的创建 1.主要方法 IBinder onBind(Intent intent):必须 ...

  2. 【转】C++虚函数解析

    本文转自陈皓大叔(左耳朵耗子)的博客www.coolshell.com. 文章是很久之前所写,去年还在写C++时有幸拜读,现在想起来还是相当有价值一转的,如果有一定C++基础(特别是读过<深度探 ...

  3. SQL Server 统计信息的创建与更新

    前期准备: 普通表.临时表:它两会有统计信息. 表变量:           不会有统计信息. ---------------------------------------------------- ...

  4. WF编译报错

    最近在研究WF的时候,遇到了一个未知的错误,错误信息时这样的 错误 102 扩展“Microsoft.Activities.Build.Validation.ValidationBuildExtens ...

  5. css案例学习之继承关系

    代码 <html> <head> <title>继承关系</title> <style> body{ color:blue; /* 颜色 * ...

  6. Hessian Servlet和Hessian Spring的简单应用

    转自: http://lancui.iteye.com/blog/935578 简介 相比WebService,Hessian更简单.快捷.采用的是二进制RPC协议(Binary),因为采用的是二进制 ...

  7. [连载]JavaScript讲义(02)--- JavaScript核心编程

    watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvamFja2ZydWVk/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA ...

  8. BNUOJ27873:A Special "Happy Birthday" Song!!!

    There are n people (excluding myself) in my 30th birthday party. They sing the traditional "hap ...

  9. CSS3实战开发 表单发光特效实战开发

    首先,我们先准备好html代码: <!doctype html> <html> <head> <meta charset="utf-8"& ...

  10. php缓存生成及更新实现参考哦

    <?php //如果在find/findAll里传入了参数,则该参数即为key ORM::factory('article')->where('user_id', '=', '2')-&g ...