Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
现在这涉及到我在每个成员方法上放置断点,并在每个方法中添加关于一个也是唯一一个成员变量的相同条件语句。有没有更简洁的方式来指定,也许是这样的:
b ClassFoo if m_classCounter > bla && m_id == 17
?
我相信您正在寻找的东西称为观察点。基本上,只要给定表达式的值发生变化,它就会中断。
http://sourceware.org/gdb/onlinedocs/gdb/Set-Watchpoints.html