gdb --- Convenience Variables

主要便于调试使用, 如观测某个变量, 或某几个变量的表达式

gdb allows creating gdb-scoped variables "on the fly":

To see the list of defined convenience variables:

To initialize a convenience variable only if it's not yet defined:

init-if-undefine $foo=i*2 条件初始化

Convenience variables are useful when writing gdb macros - we'll get to this later...

加 A Silly Feature - TUI :

entry: ctrl+x -> ctrl+a

exit: ctrl+x -> ctrl+a

原文地址:https://www.cnblogs.com/kwingmei/p/3224461.html