Two of the most important ways of controlling the debugger use breakpoints and watchpoints.
控制调试器的两种最重要的方法是使用断点和检查点。
2
The *stopped message after -exec-step is an OOB record that provides information about breakpoints, watchpoints, and why the target has halted or finished.
To get "value" and "div" in scope we can set a breakpoint on main and run the program, setting our watchpoints when the main breakpoint is hit. Restart GDB with eg1 and type.
要获取作用域中的“ value ”和“ div ”,可以在main函数上设置断点,然后运行程序,当遇到main断点时设置监视点。