开发者

how to watch struct's change process use gdb

开发者 https://www.devze.com 2023-01-24 06:56 出处:网络
I\'am now dealing with a new project, threre exist several struct for varaible transfering in parallel programming, can anybody give some hint on how to use gdb to watch struct chage proc开发者_开发技

I'am now dealing with a new project, threre exist several struct for varaible transfering in parallel programming, can anybody give some hint on how to use gdb to watch struct chage proc开发者_开发技巧ess step by step, thanks first:)


You can try GDB watch command. However, as stated by this link :

Warning: In multi-thread programs, watchpoints have only limited usefulness. With the current watchpoint implementation, GDB can only watch the value of an expression in a single thread.

If that's a deal breaker for you, I guess you will have to instrument your code to manually track changes.

0

精彩评论

暂无评论...
验证码 换一张
取 消