摘要
变量查看是C语言调试系统的基本功能之一。实现C语言简单变量查看功能很容易,但实现C语言任意复杂变量查看的功能却并不容易。实现该功能的难点在于得到复杂变量各内部元素的地址和大小等信息。要实现该功能,必须分析被调试文件中的调试信息,从中得到复杂变量各元素的调试信息。本文介绍了BWDSP芯片配套的调试系统中C语言复杂变量查看功能实现方案。该方案使用字符串协议描述复杂变量的元素,并使用统一的数据结构存储被调试文件的调试信息。该方案可以实现C语言任意复杂变量的任意元素的查看及修改功能。
Variable display is a basic function of C language debugger. It is easy to implement simple variable display functionality; however, it is difficult to achieve this for complex variable. The difficulty lies in describing elements of complex variable and locating address of the elements. To achieve this, a debugger must analyze debugging informa- tion of the application, and extract debugging information of the elements. The paper introduces solution for the prob- lem in debugger system of BWDSP. The solution defines a string representation protocol for elements in complex vari- able. The solution uses uniform data structure to store debugging information. The solution successfully implements display functionality for any complex variable
出处
《中国集成电路》
2015年第8期41-49,共9页
China lntegrated Circuit