快樂蝦
http://blog.csdn.net/lights_joy/
歡迎轉載,但請保存作者信息
當VS調試時將鼠標移到1個變量上面的時候,VS將顯示這個變量的值,實際上這個時候VS進行了表達式的計算,我們所需要做的,就是把這個進程轉換為gdb的命令:
Operation | Description |
-enable-pretty-printing | enable Python-based pretty-printing |
-var-create | create a variable object |
-var-delete | delete the variable object and/or its children |
-var-set-format | set the display format of this variable |
-var-show-format | show the display format of this variable |
-var-info-num-children | tells how many children this object has |
-var-list-children | return a list of the object’s children |
-var-info-type | show the type of this variable object |
-var-info-expression | print parent-relative expression that this variable object represents |
-var-info-path-expression | print full expression that this variable object |
represents | |
-var-show-attributes | is this variable editable? does it exist here? |
-var-evaluate-expression | get the value of this variable |
-var-assign | set the value of this variable |
-var-update | update the variable and its children |
-var-set-frozen | set frozeness attribute |
-var-set-update-range | set range of children to display on update |
經過轉換,我們就能夠在VS的窗口中看到表達式計算的結果了: