如何在gdb中列出结构信息?
|
我可以检查非结构类型,但是当检查结构时,总是得到\“
Function \"struct\" not defined.
\”:
(gdb) l ngx_http_request_t
10
11 #include <ngx_config.h>
12 #include <ngx_core.h>
13
14
15 typedef struct ngx_http_request_s ngx_http_request_t;
16 typedef struct ngx_http_upstream_s ngx_http_upstream_t;
17 typedef struct ngx_http_cache_s ngx_http_cache_t;
18 typedef struct ngx_http_file_cache_s ngx_http_file_cache_t;
19 typedef struct ngx_http_log_ctx_s ngx_http_log_ctx_t;
(gdb) l struct ngx_http_request_s
Function \"struct\" not defined.
gdb中可能吗?
没有找到相关结果
已邀请:
3 个回复
剃摧庭峨僳
寿柬窟年
通常与行号一起使用以查看特定的代码行,尽管它可以与函数名一起使用。 由于“ 4”不是行号或函数名,因此无法查看其定义。 您期望什么类型的输出? 看起来您确实想要
中的数据值,这意味着您必须首先创建该类型的结构。
曝匿弄罚
(gdb)打印foo