我是靠谱客的博主 要减肥胡萝卜,最近开发中收集的这篇文章主要介绍GDB MI命令GDB MI命令,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

GDB MI命令

Breakpoint 指令

IDGDB MI CommandGDB Command
1-break-after number countignore
2-break-commands number [ command1 … commandN ]commands
3-break-condition [ --force ] number [ expr ]condition
4-break-delete ( breakpoint )+delete
5-break-disable ( breakpoint )+disable
6-break-enable (breakpoint )+enable
7-break-info breakpointinfo break breakpoint
8-break-insert * [ -t ] [ -h ] [ -f ] [ -d ] [ -a ] [ --qualified ] [ -c condition ] [ -force-conditon ] [ -i ignore-count ] [ -p thread-id ] [ location ]break, tbreak, hbreak, thbreak
9-dprintf-insert* [ -t ] [ -f ] [ -d ] [ --qualified ] [ -c condition] [ --force-condition ] [ -i ignore-count ] [ -p thread-id ] [ location ] [ format ] [argument ]dprintf
10-break-listinfo break
11-break-passcount tracepoint-number passcountpasscount
12-break-watch [ -a | -r ]watch, awatch, rwatch

注:

*: 1. location can be: linespec location, explicit location and address location

​ 2. t => temporary , h => hardware , f => pending, d => disabled, a => tracepoint, c => condition

Catchpoint 指令

IDGDB MI CommandsGDB Commands
1-catch-load [ -t ] [ -d ] regexpcatch load
2-catch-unload [ -t ] [ -d ] regexpcatch unload
3-catch-throw [ -t ] [ -r regexp ]catch throw, tcatch throw
4-catch-rethrow [ -t ] [ -r regexp ]catch rethrow, tcatch rethrow
5-catch-catch [ -t ] [ -r regexp ]catch catch, tcatch catch
6-catch-assert* [ -c condition ] [ -d ] [ -t ]catch assert
7-catch-exception* [ -c condition ] [ -d ] [ -e exception-name ] [ -t ] [ -u]catch excepton, catch exception unhandled
8-catch-handlers* [ -c condition ] [ -d ] [ -e exception-name ] [-t ]catch handlers

注: * Ada Exception

Program Context 指令

IDGDB MI CommandsGDB Commands
1-exec-arguments argsset args
2-environment-cd pathdircd
3-environment-directory [ -r ] [ pathdir ]+dir
4-environment-path [ -r ] [ pathdir ]+path
5-environment-pwdpwd

Thread 指令

IDGDB MI CommandsGDB Commands
1-thread-info [ thread-id ]info thread
2-thread-list-idsinfo threads
3-thread-select thread-idthread

Program Execute 指令

IDGDB MI CommandsGDB Commands
1-exec-continue [ --reverse ] [ --all | --thread-group N ]continue
2-exec-finish [ --reverse ]finish
3-exec-interrupt [ --all | --thread-group N ]interrupt
4-exec-jump locationjump
5-exec-next [ --reverse ]next
6-exec-next-instruction [ --reverse ]nexti
7-exec-run [ --all | --thread-group N ] [ --start ]run
8-exec-step [ --reverse ]step
9-exec-step-instruction [ --reverse ]stepi
10-exec-until [ location ]until
11-exec-returnreturnInf

Stack Manipulation 指令

IDGDB MI CommandsGDB Commands
1-enable-frame-filtersinfo frame, frame
2-stack-info-depth [ max-depth ]no equivalent GDB Command
3-stack-list-arguments [ --no-frame-filters ] [ --skip-unavailable ] print-values [ low-frame high-frame ]no equivalent GDB Command
4-stack-list-frames [ --no-frame-filters low-frame hight-frame ]backtrace, where
5-stack-list-locals [ --no-frame-filters ] [ --skip-unavailable ] print-valuesinfo locals
6-stack-list-variables [ --no-frame-filters ] [ --skip-unavailable ] print-values
7-stack-select-frame framenumframe, up, down, select-frame, up-silent, down-silent

Variable Objects 指令

Data Manipluation 指令

IDGDB MI CommandsGDB Commands
1-data-disassemable [ -s start-addr -e end-addr ] | [ -a addr ] | [ -f filename -l linenum ] [ -n lines ] – modedisassemble
2-data-evaluate-expression exprprint, output, call
3-data-list-changed-registers
4-data-list-register-names [ ( regno )+ ]
5-data-list-register-values [ --skip-unavailabe ] fmt [ ( regno )+ ]info reg, info all-reg
6-data-read-memory [ -o byte-offset ] address word-format word-size nr-rows nr-cols [ aschar ]x
7-data-read-memory-bytes [ -o offset ] addres coutnx
8-data-write-memory-bytes address contents [count ]

Tracepoint 指令

IDGDB MI CommandsGDB Commands
1-tarce-find mode [ parameters… ]tfind
2-trace-define-variable name [ value ]tvariable
3-trace-frame-collected [ --var-print-values var_pval ] [ --comp-print-values cmp_pval ] [ --registers-format regformt ] [ --memory-contents ]
4-trace-list-variablestvariables
5-trace-save [ -r ] [ -ctf ] filenametsave
6-trace-starttstart
7-trace-statuststatus
8-trace-stoptstop

Symbol Query 指令

IDGDB MI CommandsGDB Commands
1-symbol-info-functions [ --include-nondebug ] [ --type type_regexp ] [ --name name_regexp ] [ --max-results limit ]info functions
2-symbol-info-module-functions [ --module module_regexp ] [ --name name_regexp ] [ --type type_regexp ]info module functions
3-symbol-info-module-variables [ --module module_regexp ] [ --name name_regexp ] [ --type type_regexp ]info module variables
4-symbol-info-modules [ --name name_regexp ] [ --max-results limit ]info modules
5-symbol-info-types [ --name name_regexp ] [ --max-results limit ]info types
6-symbol-info-variables [ --include-nondebug ] [–type type_regexp ] [ --name name_regexp ] [ --max-results limit]info variables
7-symbol-list-lines filename

File 指令

IDGDB MI CommandsGDB Commands
1-file-exec-and-symbols filefile
2-file-exec-file fileexec-file
3-file-list-exec-source-fileinfo source
4-file-list-exec-source-filesinfo sources
5-file-list-shared-libraries [ regexp]info shared
6-file-symbol-file filesymbol-file

Target Manipulation 指令

IDGDB MI CommandsGDB Commands
1-target-attach pid | gid | fileattach
2-target-detach [ pid | gid ]detach
3-target-disconnectdisconnect
4-target-downloadload
5-target-flash-eraseflash-erase
6-target-select type parameters …target

File Transfer 指令

IDGDB MI CommandsGDB Commands
1-target-file-put hostfile targetfileremote put
2-target-file-get targetfile hostfileremote get
3-target-file-delete targetfileremote delete

Ada Exception 指令

IDGDB MI CommandsGDB Commands
1-info-ada-exceptions [ regexp ]info exceptions

GDB/MI Suppports 指令

IDGDB MI CommandsGDB Commands
1-info-gdb-mi-command cmd_name
2-list-features
3-list-target-features

Miscellaneous 指令

IDGDB MI CommandsGDB Commands
1-gdb-exitquit
2-gdb-setset
3-gdb-showshow
4-gdb-versionshow version
5-list-thread-groups [ --avaiable ] [ --recures 1 ] [ group …]
6-info-os [type]info os
7-add-inferior
8-interpreter-exec interpreter commandinterpreter-exec
9-inferior-tty-set [dev]set inferior-tty [dev]
10-inferior-tty-showshow inferior-tty
11-enable-timings [ yes | no ]
12-complete commandcomplete

最后

以上就是要减肥胡萝卜为你收集整理的GDB MI命令GDB MI命令的全部内容,希望文章能够帮你解决GDB MI命令GDB MI命令所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(39)

评论列表共有 0 条评论

立即
投稿
返回
顶部