gdb

gdb @ 可以打印地址后面指定长度的字节

(gdb) p * attr2->aspath->data
$5 = 2 '\002'

 

(gdb) p attr2->aspath->data
$3 = (u_int8_t *) 0x160fa48 "\002\002"

 

(gdb) p * attr2->aspath->data@12
$11 = "\002\002\000{\001A\000\000\274\246\374\003"


(gdb) p/x * attr2->aspath->data@12
$12 = {0x2, 0x2, 0x0, 0x7b, 0x1, 0x41, 0x0, 0x0, 0xbc, 0xa6, 0xfc, 0x3}

 

gdb watch 可以一直监视某固定地址的值的变化

gdb watch *0x7ddada4412a

 

posted on 2023-07-21 17:03  开源侠  阅读(9)  评论(0编辑  收藏  举报