gdb exe
gdb exe core
gdb -p

info m TAB
^関数の先頭

info b
^list the breakpoint

set args -a test
^引数設定

show args
^引数表示

path directory
(‘:’ on Unix, ‘;’on MS-DOS and MS-Windows).
^パス設定
show path

show environment [varname]
set environment varname [=value]
unset environment varname
^環境変数 表示 設定 削除

info terminal
^端末の情報

r > outfile
^出力redirect

attach process-id
gdb -p と同じ

kill pid

info inferiors
^表示子process

inferios infno
^切り替えpid

add-inferior [ -copies n ] [ -exec executable ]
^追加process

clone-inferior [ -copies n ] [ infno ]
^copy目前process

remove-inferior infno
^削除情報

detach inferior infno
        ^cancel debug

kill inferior infno
^停止情報

set print inferior-events on|off <- 表示inferior情報
show print inferior-events

set detach-on-fork on|off <- forkのときdetach発生
show detach-on-fork

set follow-fork-mode parent|child <- on forkのとき親に追いつけ
show follow-fork-mode

set follow-exec-mode new same

set schedule-multiple on|off<- onのときスレッド同時実行
show schedule-multiple

detach

info threads
^list all threads

thread thread-id

thread apply [thread-id or all] command
^実行comand on thread

checkpoint
^set a check point to save the runtime info
info checkpoints

restart checkpoint-id
^restart the check point
delete checkpoint checkpoint-id

break ... if cond

disable breakpoint
enable breakpoint

save breakpoints

next
step
finish <-finish function

bt

debug macro

Now, we compile the program using the gnu C compiler, gcc. We pass the ‘-gdwarf-2’1
and ‘-g3’ flags to ensure the compiler includes information about preprocessor macros in
the debugging information.
$ gcc -gdwarf-2 -g3 sample.

info macro Add

macro expand Add(2)

no used
info signals
info handle
Print a table of all the kinds of signals and how gdb has been told to handle
each one. You can use this to see the signal numbers of all the defined types of
signals.
info signals sig
Similar, but print information only about the specified signal number.
info handle is an alias for info signals.
catch signal [signal... | ‘all’]
Set a catchpoint for the indicated signals. See Section 5.1.3 [Set Catchpoints],
page 54, for details about this command.
handle signal [keywords...]
Change the way gdb handles signal signal. The signal can be the number of a
signal or its name (with or without the ‘SIG’ at the beginning); a list of signal
numbers of the form ‘low-high’; or the word ‘all’, meaning all the known
signals. Optional arguments keywords, described below, say what change to
make.
The keywords allowed by the handle command can be abbreviated. Their full names
are:
nostop gdb should not stop your program when this signal happens. It may still print
a message telling you that the signal has come in.
stop gdb should stop your program when this signal happens. This implies the
print keyword as well.
print gdb should print a message when this signal happens.
noprint gdb should not mention the occurrence of the signal at all. This implies the
nostop keyword as well.
pass
noignore gdb should allow your program to see this signal; your program can handle the
signal, or else it may terminate if the signal is fatal and not handled. pass and
noignore are synonyms.
nopass
ignore gdb should not allow your program to see this signal. nopass and ignore are
synonyms.
When a signal stops y

91pdf

gdb 常用内容的更多相关文章

  1. GDB常用命令使用说明(一)

    本文由霸气的菠萝原创,转载请注明出处:http://www.cnblogs.com/xsln/p/gdb_instructions1.html 全部关于gdb的文章索引请点这里 GDB(GNU Deb ...

  2. gdb 常用命令总结(精优)

    格式说明: [xxx]:可选参数,即可以指定可以不指定,实际输入的内容是 xxx <xxx>:占位参数,即必须指定的参数,实际输入的内容是 xxx gdb 常用命令: gdb [file] ...

  3. C 调试 gdb常用命令

    gdb常用命令: [root@redhat home]#gdb 调试文件:启动gdb (gdb) l :(字母l)从第一行开始列出源码 (gdb) break n :在第n行处设置断点 (gdb) b ...

  4. GDB常用调试命令(一)

    GDB是UNIX及UNIX-like下的调试工具,通常gdb使用前置条件:编译时加入debug信息,这里指的是C++. gcc/g++调试选项   gcc/g++是在编译时加入-g,-g分4个等级: ...

  5. 第07课:GDB 常用命令详解(下)

    本课的核心内容: disassemble 命令 set args 和 show args 命令 tbreak 命令 watch 命令 display 命令 disassemble 命令 当进行一些高级 ...

  6. Linux GDB常用命令一栏

    Linux GDB 常用命令如下: 1.启动和退出gdb (1)启动:gdb ***:显示一段版权说明: (*** 表示可执行程序名) (2)退出:quit.有的时候输入quit后会出现相关提示:类似 ...

  7. jQuery中的常用内容总结(一)

    jQuery中的常用内容总结(一)   前言 不好意思(✿◠‿◠),由于回家看病以及处理一些其它事情耽搁了,不然这篇博客本该上上周或者上周写的:同时闲谈几句:在这里建议各位开发的童鞋,如果有疾病尽快治 ...

  8. jQuery中的常用内容总结(三)

    jQuery中的常用内容总结(三) 转载请注明地址:http://www.cnblogs.com/funnyzpc/p/7571998.html 内容提要 选择器(第一节) 选择器的扩展方法(第一节) ...

  9. jQuery中的常用内容总结(二)

    jQuery中的常用内容总结(二) 转载请注明地址: http://www.cnblogs.com/funnyzpc/p/7571993.html 前言 距离上次博客更新已经有二十来天了(●′ω`●) ...

随机推荐

  1. mvc 中的 [ChildActionOnly] 和 [NonAction]

    首先,NonAction表示它不是一个真正的Action,而是一个普通方法, 就像我们定义一个普通的方法那样,返回值可以任意定义; 而  ChildActionOnly表示它只能在View中通过Htm ...

  2. Oracle表结构修改触发视图无法正常使用问题

    一.问题描述 当对视图使用的基表进行表结构修改后,会触发视图的无效以及编译出错问题,必须重建视图解决. 二.问题再现 1.Oracle10g环境 1.1 创建视图测试用两张基表:TestTable和T ...

  3. 关于oracle中in和exists的区别

    一般来说,这两个是用来做两张(或更多)表联合查询用的,in是把外表和内表作hash 连接,而exists 是对外表作loop 循环,假设有A.B两个表,使用时是这样的: 1.select * from ...

  4. 【转】PowerShell 连接SQL Server 数据库 - ADO.NET

    转至:http://www.pstips.net/connect-sql-database.html PowerShell 通过ADO.NET连接SQL Server数据库,并执行SQL脚本.工作中整 ...

  5. 【日常小记】linux中强大且常用命令:find、grep【转】

    转自:http://www.cnblogs.com/skynet/archive/2010/12/25/1916873.html 在linux下面工作,有些命令能够大大提高效率.本文就向大家介绍fin ...

  6. github初体验

    1.服务端 首先得有一个github账号 用户名和密码 2.客户端 github是服务端,要想在自己电脑上使用git我们还需要一个git客户端,我这里选用msysgit,这个只是提供了git的核心功能 ...

  7. SSH框架整合项目(一)——搭建平台和引入依赖

    前言:这个项目是我的第一个实验性项目,最初的立意是制作一个个性化的BBS.由于BBS能够综合大部分功能,因此作为练手的项目来说再好不过.从写第一行代码到完成测试版大概历时2周.中间遇到了不少以前在学习 ...

  8. 关于访问链接返回XML的获取数据

    1. 返回DataSet格式; /// <summary> /// 向某个url提交数据并读取该地址返回的xml,并将xml转换成dataset,并返回dataset中某个表 /// &l ...

  9. 初学者-微信小程序 问题解决办法记录

    1.tabBar不显示的问题 1),检查大小写 2),pagePath路径书写,和pages路径一样,不能多或者少一个"/"或者"?" 2.tabBar和nav ...

  10. 使用AFNetWorking 实现以Basic Authentication方式获取access-token

    由于服务器端对于调用API获取数据接口进行了限制,需要在调用API之前获取一个access-token,所以需要在iOS里实现获取这个access-token的功能. 服务器端是在ASP.NET中基于 ...