Brew debugger is a pure software tool without additional hardware support. It is connected to the mobile phone through a serial port or USB port and can freely use the tool in cygwin. Brew debugger requires the ADS/GCC compiling library, the arm/thumb mode library, and the debugger binding program.
Through the GNU/ADS cross compiler, developers can use the gdb command line or the image interface of the Insight software for debugging. Brew debugger supports all gdb commands, source code and assembly language debugging, breakpoint setting, check registers, variables and memory, and single-step tracking. The architecture of brew debugger is 16-4.
Figure16-4:Brew DebuggerArchitecture
Insight is one of the gnupro R & D kits of RedHat. It is a GDB-Based Front-End Tool packaged with TK (the version number is exactly the same as that of GDB. The online debugging page in insight is shown in Figure 16-5.
Figure16-5:Use insightOnline debugging page
GDB is a powerful Unix program debugging tool released by the GNU open-source organization. The GDB debugging tool has more powerful functions than the visual debugger of VC and BCB. Generally, GDB provides the following functions:
1. Start the program and run the program as needed according to the custom requirements.
2. The program to be debugged can be stopped at the specified breakpoint. (The breakpoint can be a conditional expression)
3. When the program is stopped, you can check what happens in the program.
4. dynamically change the execution environment of the program.
Use the command line in GDB to debug the BREW application, as shown in Figure 16-6.
Figure16-6:Use GDBOnline debugging page
Unfortunately, the use of brew debugger also relies on the support of the OEM layer. mobile phone manufacturers need to modify the Toolkit through transplantation, and only brew 3. X or later versions can be supported.