一种与机器无关的编程器--再谈
A Machine-Independent Debugger--Revisited
摘要:
大多数调试器是出了名的机器依赖,但最近的一些研究原型实现了不同程度的机器独立性与新颖的设计。Cdb是一个简单的C源代码级调试器,完全独立于其目标体系结构。这种独立性是通过在目标程序中嵌入符号表和调试代码来实现的,这既耗费时间又占用空间。本文描述了cdb的一种改进设计和实现,通过将符号表存储在外部文件中,它减少了近一半的空间开销和13%的时间开销。符号表由抽象语法描述语言(ASDL)中的31行语法定义。ASDL是一种用于指定树数据结构的特定于域的语言。ASDL工具接受ASDL语法并生成代码来构造、读取和写入这些数据结构。使用ASDL可以自动实现调试器的各个部分,并且语法可以简洁地记录符号表。使用ASDL还建议简化调试器和目标程序之间的接口。也许最重要的是,ASDL强调符号表是数据结构,而不是文件格式。通过关注高级数据结构并自动化实现细节,可以避免处理低级文件格式的许多陷阱。
英文摘要:
Most debuggers are notoriously machine-dependent, but some recent research prototypes achieve varying degrees of machine-independence with novel designs. Cdb, a simple source-level debugger for C, is completely independent of its target architecture. This independence is achieved by embedding symbol tables and debugging code in the target program, which costs both time and space. This paper describes a revised design and implementation of cdb that reduces the space cost by nearly one-half and the time cost by 13% by storing symbol tables in external files. A symbol table is defined by a 31-line grammar in the Abstract Syntax Description Language (ASDL). ASDL is a domain-specific language for specifying tree data structures. The ASDL tools accept an ASDL grammar and generate code to construct, read, and write these data structures. Using ASDL automates implementing parts of the debugger, and the grammar documents the symbol table concisely. Using ASDL also suggested simplifications to the interface between the debugger and the target program. Perhaps most important, ASDL emphasizes that symbol tables are data structures, not file formats. Many of the pitfalls of working with low-level file formats can be avoided by focusing instead on high-level data structures and automating the implementation details.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。