如何使用GDB显示不同C文件中的同名结构体内容

来源:互联网 发布:卡祖笛淘宝 编辑:程序博客网 时间:2024/06/01 14:04
先list 该文件中的function,然后再打印该结构体。
如:
(gdb) p *(entry_t*)0x7fda00004a00
$22 = {type = CRED_CERTIFICATE, subtype = 32730, final = 2, constructor = 0x7fda00000000}
(gdb) list auth_cfg.c:add
489
490 /**
491  * Implementation of auth_cfg_t.add.
492  */
493 static void add(private_auth_cfg_t *this, auth_rule_t type, ...)
494 {
495 entry_t entry;
496 va_list args;
497
498 va_start(args, type);
(gdb) p *(entry_t*)0x7fda00004a00
$23 = {type = AUTH_RULE_AUTH_CLASS, value = 0x2}
(gdb) 

0 0