ABSTRACT
In the context of embedded systems such as cell-phones, PDA or cars and planes software, optimizations of code are required because of timing and memory constraints imposed. Many problems arise when trying to debug optimized code. One of them is the irrelevance of the mapping between the source code and the optimized target program: the Code Location Problem. This paper proposes a solution to this problem in the case of highly optimized code in the context of embedded systems.
Two approaches exist: non-transparent and transparent debugging. Our approach is non-transparent. The idea is to reveal the execution of the optimized program to the user so the latter understands the mapping to the source code in spite of transformations applied to the program. We do not emulate the execution of the unoptimized program. We make good use of the programmer's knowledge of its development platform. Standard debuggers do not provide the required mechanisms while compilers do not provide the relevant debug information. We propose a novel method to maintain accurate debug information when optimizing at compilation and we experiment this method on the MMDSP+ C compiler and the IDBug debugger.
- ACE Associated Compiler Experts bv. CoSy Compilers, Overview of Construction and Operation. White paper, 24 Apr. 2003.Google Scholar
- A.-R. Adl-Tabatabai. Source Level Debugging of Globally Optimized Code. PhD thesis, Carnegie Mellon University, Pittsburgh PA 15213-3891, June 1996.Google Scholar
- A.-R. Adl-Tabatabai and T. Gross. Detection and recovery of endangered variables caused by instruction scheduling. In PLDI: Proceedings of the ACM SIGPLAN conference on Programming Language Design and Implementation, volume 28, pages 13--25, New York, NY, USA, June 1993. Google ScholarDigital Library
- A.-R. Adl-Tabatabai and T. Gross. Evicted variables and the interaction of global register allocation and symbolic debugging. In POPL: Proceedings of the ACM SIGACT-SIGPLAN symposium on Principles Of Programming Languages, pages 371--383, New York, NY, USA, 1993. ACM Press. Google ScholarDigital Library
- V. Bertin, J.-M. Daveau, P. Guillaume, T. Lepley, D. Pilat, C. Richard, M. Santana, and T. Thery. Flexcc2: An optimizing retargetable c compiler for dsp processors. In EMSOFT '02: Proceedings of the Second International Conference on Embedded Software, pages 382--398, London, UK, 2002. Springer-Verlag. Google ScholarDigital Library
- M. Copperman. Debugging optimized code without being misled. PhD thesis, University of California, Santa Cruz, Pasadena, CA, USA, 1993. Google ScholarDigital Library
- D. S. Coutant, S. A. Meloy, and M. Ruscetta. Doc: a practical approach to source-level debugging of globally optimized code. In PLDI: Proceedings of the ACM SIGPLAN conference on Programming Language Design and Implementation, volume 23, pages 125--134, New York, NY, USA, July 1988. ACM Press. Google ScholarDigital Library
- J.-M. Daveau, T. Thery, T. Lepley, and M. Santana. A retargetable register allocation framework for embedded processors. In LCTES '04: Proceedings of the 2004 ACM SIGPLAN/SIGBED conference on Languages, compilers, and tools for embedded systems, pages 202--210, New York, NY, USA, 2004. ACM Press. Google ScholarDigital Library
- DWARF Debugging Information Format Workgroup, A Workgroup of the Free Standards Group, http://dwarf.freestandards.org/. The DWARF Debugging Standard.Google Scholar
- L. Gerard, D. Pilat, F. Riss, S. Laheurte, M. Santana, and H. Venturini. IDBug Technology, Benefits and Added-value. White Paper, STMicroelectronics, F-38921 Crolles France, jul 2005.Google Scholar
- J. Hennessy. Symbolic debugging of optimized code. TOPLAS: ACM Transactions on Programming Languages and Systems, 4(3):323--344, July 1982. Google ScholarDigital Library
- C. I. Jaramillo. Source Level Debugging Techniques And Tools For Optimized Code. PhD thesis, University of Pittsburgh, 2000. Google ScholarDigital Library
- P. G. Paulin and M. Santana. Flexware: A retargetable embedded-software development environment. IEEE Design & Test of Computers, 19(4):59--69, 2002. Google ScholarDigital Library
- R. M. Stallman, R. Pesch, S. Shebs, et al. Debugging with GDB: The GNU Source-Level Debugger. Free Software Foundation, 2002.Google Scholar
- L. V. J. Streepy, G. Brooks, T. Buyse, M. Chiarelli, M. Garzione, G. Hansen, D. Lingle, S. Simmons, and J. Woods. Cxdb a new view on optimization. In Proceedings of Supercomputer Debugging Workshop, pages 1--22, November 1991.Google Scholar
- C. M. Tice. Non-transparent debugging of optimized code. Technical report, University of California at Berkeley, Berkeley, CA, USA, November 1999. Google ScholarDigital Library
- C. M. Tice and S. L. Graham. Optview: A new approach for examining optimized code. In PASTE: Workshop on Program Analysis For Software Tools and Engineering, pages 19--26, 1998. Google ScholarDigital Library
- C. M. Tice and S. L. Graham. Key instructions: Solving the code location problem for optimized code. 2000.Google Scholar
- H. Venturini, F. Riss, J.-C. Fernandez, and M. Santana. Non-transparent debugging for software-pipelined loops. In CASES: Proceedings of the international conference on Compilers, Architecture, and Synthesis for Embedded Systems, pages 23--32, New York, NY, USA, oct 2007. ACM Press. Google ScholarDigital Library
- L.-C. Wu. Interactive source-level debugging of optimized code. PhD thesis, 2000. Adviser-Wen-Mei W. Hwu. Google ScholarDigital Library
- P. T. Zellweger. Interactions between high-level debugging and optimised code. PhD thesis, Computer Science Division, University of California, Berkeley, 1984.Google Scholar
- P. T. Zellweger. Interactive source-level debugging of optimized programs. Research Report CSL-84-5, Xerox Palo Alto Research Center, 3333 Coyote Hill Road, Palo Alto, California 94304, May 1984.Google Scholar
Index Terms
- A fully-non-transparent approach to the code location problem
Recommendations
Transparent Debugging of Dynamically Optimized Code
CGO '09: Proceedings of the 7th annual IEEE/ACM International Symposium on Code Generation and OptimizationDebugging programs at the source level is essential in the software development cycle. With the growing importance of dynamic optimization, there is a clear need for debugging support in the presence of runtime code transformation. This paper presents a ...
Understanding code snippets in code reviews: a preliminary study of the OpenStack community
ICPC '22: Proceedings of the 30th IEEE/ACM International Conference on Program ComprehensionCode review is a mature practice for software quality assurance in software development with which reviewers check the code that has been committed by developers, and verify the quality of code. During the code review discussions, reviewers and ...
Comments