下载此文档

linux下gdb单步调试(GDB single step debugging under Linux).doc


文档分类:IT计算机 | 页数:约23页 举报非法文档有奖
1/23
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/23 下载此文档
文档列表 文档介绍
linux下gdb单步调试(GDB single step debugging under Linux)
GDB single step debugging under Linux
Set breakpoint (BreakPoint)
We set breakpoints with the mand. How many breakpoints are set on the front?:
Break <function>
Stop when you enter the specified function. In C++, you can specify the function name in class:: function or function (type, type) format.
Break <linenum>
Stop at the specified line number.
Break +offset
Break -offset
Stops at the front or back of the current line number in the offset row. Offiset is a natural number.
Break filename:linenum
Stop at the linenum row of the source file filename.
Break filename:function
Stop at the entrance of the function function of the source file filename.
Break *address
Stop at the memory address of the program running.
Break
When the mand does not have a parameter, it means that it stops at the next instruction.
Break... If <condition>
It can be the parameter mentioned above. Condition represents the condition and stops when the condition is established. For example, in the loop body, you can set the break if i=100 to indicate the stop program when I is 100.
When you look at breakpoints, you can use the mand, as follows: (Note: n represents breakpoint number)
Info breakpoints [n]
Info break [n]
Two. Set observation points (WatchPoint)
Observation points are generally used to observe whether an expression (variable is also an expression) has changed, and if there is a change, stop the program immediately. We have several ways to set up observation points:
Watch <expr>
Set an observation point for the expression (variable) expr. Stop the program immediately when there is a change in the expression value.
Rwatch <expr>
When the expression of expr (variable) read, stop program.
Awatch <expr>
When the expression (variable) values read or written to, stop the program.
Info watchpoints
Lists all the observation points currently set up.
Three, set the capture point (CatchPoint)
You can set up c

linux下gdb单步调试(GDB single step debugging under Linux) 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数23
  • 收藏数0 收藏
  • 顶次数0
  • 上传人rjmy2261
  • 文件大小26 KB
  • 时间2017-11-22