gdb小帮手
时间:2022-03-13 22:54
在LINUX下干活基本不要指望着像在WIN下干活那么舒服。
不同的版本和不同的库都可能会引起各种不同的错误现象。一定要有心理准备。
(gdb) p *pid
$15 = {id = 7, feature_offset = -1, feature = "&usr=", ‘\000‘ <repeats 24 times>, feature_len = 0,
type = 0 ‘\000‘, result_offset = 4, result_len = 32, proto_no = 1,
fill_fileld = 0x4080b4 <fill_fileld_str>, end_mark = "&", ‘\000‘ <repeats 28 times>, ext = 0x0}
(gdb) set print pretty on //
(gdb) p *pid
$16 = {
id = 7,
feature_offset = -1,
feature = "&usr=", ‘\000‘ <repeats 24 times>,
feature_len = 0,
type = 0 ‘\000‘,
result_offset = 4,
result_len = 32,
proto_no = 1,
fill_fileld = 0x4080b4 <fill_fileld_str>,
end_mark = "&", ‘\000‘ <repeats 28 times>,
ext = 0x0
}
-g //添加调试功能
-Wall //添加编译打印
gdb小帮手,布布扣,bubuko.com