This article will introduce debug debugging related content, including debugger, performance analysis, heap tracking, tracking events and so on;
The Alias.h:alias function, which provides an operation to prevent a parameter variable from being loaded by the Microsoft compiler, internally through the #pragma optimize ("", off) with #pragma optimize ("", on) to enable all optimization options to be closed, Restore them to the original (or default) setting; In fact, no operations are implemented within alias.
Debugger.h:
1. Spawndebuggeronprocess: Provides a JIT-ready debugger that starts registering the system level and attaches it to the specified process; You can see the cross-platform versions available internally, Microsoft and POSIX versions, and the Microsoft version by accessing the registry Hkey_local_ Machine under Software\\microsoft\\windows nt\\currentversion\\aedebug the value of the key debugger, such as "C:\windows\system32\ Vsjitdebugger.exe "-P%ld-e%ld, where Vsjitdebugger.exe is Microsoft's vs Instant debugger, the parameter-P%LD is the process ID of the process that will be debugged Id,-e%ld to the executable, You can actually specify the same process ID value, then create a new process to turn it on, and the POSIX version calls the system function systems, the parameter xterm-e ' gdb--pid=%u ' &, and also the Process Id,gdb debugging tool.
2. Waitfordebugger: Wait for the specified time of the second wait_seconds return, or set the parameter silent to false, if the debugger checks to throw an exception to enter the debugging, the internal use for the loop for a maximum of 10*wait_seconds times, Wait 100 milliseconds, just wait_seconds seconds, and loop through beingdebugged (if the specified process is attach run in the debugger, the return value is true);
3. Beingdebugged: Available in different versions, the Microsoft version is judged by the Isdebuggerpresent function (judging whether the calling process is debugged by the user-mode debugger, in fact); Other versions are subdivided into Linux, BSD, Android and other versions, which are not detailed;
4. Breakdebugger: Provide different version, Microsoft version through __debugbreak, suspend program execution, open debugger, enter debug mode;
5. Setsuppressdebugui,isdebuguisuppressed is currently used in the UI interface to test the settings of the operation.
Debug_on_start_win.h:
1. Provides a class that supports debugging at the time of running the program, only provides init,findargument static interface implementation, debugging through the command line, at most wait time 60s into debugging, and for the command line debugging process is waiting for the debug call. The functionality provided by this class is not currently used elsewhere or in project projects.
Google's Chromium browser source learning--base Public General Library (iv)