gdb 命令汇总

Posted aerfa828

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了gdb 命令汇总相关的知识,希望对你有一定的参考价值。

https://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_109.html

 

whatis expr

举例 whatis  uint64      ->   unsigned  long long 

Print the data type of expression exprexpr is not actually evaluated, and any side-effecting operations (such as assignments or function calls) inside it do not take place. See section Expressions.whatisPrint the data type of $, the last value in the value history.ptype typenamePrint a description of data type typenametypename may be the name of a type, or for C code it may have the form `class class-name`struct struct-tag`unionunion-tag or `enum enum-tag.ptype exprptypePrint a description of the type of expression exprptype differs from whatis by printing a detailed description, instead of just the name of the type. For example, for this variable declaration:

struct complex {double real; double imag;} v;

the two commands give this output:

(gdb) whatis v
type = struct complex
(gdb) ptype v
type = struct complex {
    double real;
    double imag;
}

 

以上是关于gdb 命令汇总的主要内容,如果未能解决你的问题,请参考以下文章

Linux下的软件包管理器(yum),编译器(vim),编译器(gcc/g++),调试器(gdb)使用大汇总

基于c语言中调试工具的用法汇总(不包含gdb)

代码调试篇:如何编写 gdb 自定义命令

代码调试篇:如何编写 gdb 自定义命令

GDB 调试Coredump问题

gdb 调试程序步骤