| The embedded systems are being applied almost everywhere in life,from communications,consumer electronics to automotive electronics,intelligent machines,industrial control and satellite navigation,and its usage quantity has been much larger than the general computer.The embedded devices are widely used for their low power consumption,high reliability,application-specific and flexible customization.The emergency of embedded multi-core technology further enhance the processing power of embedded system,but it also brings difficulties to the development of program in multicore system.At present,multi-debugger is mainly based on hardware implementation.The traditional cross-debugger is not only bulky,but also can not control the scheduling of the program.the program scheduling operations is done by the operating system in traditional cross-debugger,so it can not support the multi-core debugging.Hardware multi-core debugger is not only expensive but not general,but the operating system running on the embedded device having more common versatility,the development of multi-core software debugging tools becoming the focus of attention.The paper first studies the debugging mechanism of the arm-linux system,the realization principle of cross-debugger and summarizes the characteristics of hardware multi-core debugging technology.On the basis of the above,we further improve the crossdebugger design and implement a multi-core debugger with basic debugging function.This multi-core debugger implemented the traditional basic debugging function,such as setting breakpoint,single-step running,reading and writing variables in memory and so on,and increased some multi-core debugging functions,mainly including acquiring the kernel number of running process in real time,choosing the kernel for running program,sending the debug commands to the specified kernel,controlling the execution status of each kernel,and acquiring the context of the currently running program on each core.Through the above functions,the program developer can learn more about the running status of the program on the target machine,and better position the various errors and exceptions in the program.For this reason,this paper chooses the A33 ARM-Cortex-A7 target board and designed the debugger based on the arm-linux system.The debugging tool made some improvements compared to the traditional cross-debugger,such as the breakpoint information stored in the host side,etc.,and redesigned the overall structure,making the whole system more streamlined.This paper makes a detailed analysis and implements the various functional modules,such as symbol analysis,exception handling,etc.,so that the implementation principle of the debugger at a glance.The function of enabling the specified kernel to execute the debugging command was implemented by setting the process or thread cpu affinity,inter-core interrupted and binding specify a process or thread to a specific kernel.This multi-core debugging tool can view the status of the specific kernel in real time and make a better understanding of the operating status of system.Improving the debugging agent makes the remote sharing target debugging possible.Finally,through testing,the newly designed software multi-core crossdebugging tool better meets the needs of multi-core debugging.Let the program make full use of processing power of the multi-core cpu and this tool improve the development efficiency of multi-core program. |