skip to main content
10.1145/1361096.1361108acmconferencesArticle/Chapter ViewAbstractPublication PagesscopesConference Proceedingsconference-collections
research-article

A fully-non-transparent approach to the code location problem

Published: 13 March 2008 Publication History

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.

References

[1]
ACE Associated Compiler Experts bv. CoSy Compilers, Overview of Construction and Operation. White paper, 24 Apr. 2003.
[2]
A.-R. Adl-Tabatabai. Source Level Debugging of Globally Optimized Code. PhD thesis, Carnegie Mellon University, Pittsburgh PA 15213-3891, June 1996.
[3]
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.
[4]
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.
[5]
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.
[6]
M. Copperman. Debugging optimized code without being misled. PhD thesis, University of California, Santa Cruz, Pasadena, CA, USA, 1993.
[7]
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.
[8]
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.
[9]
DWARF Debugging Information Format Workgroup, A Workgroup of the Free Standards Group, http://dwarf.freestandards.org/. The DWARF Debugging Standard.
[10]
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.
[11]
J. Hennessy. Symbolic debugging of optimized code. TOPLAS: ACM Transactions on Programming Languages and Systems, 4(3):323--344, July 1982.
[12]
C. I. Jaramillo. Source Level Debugging Techniques And Tools For Optimized Code. PhD thesis, University of Pittsburgh, 2000.
[13]
P. G. Paulin and M. Santana. Flexware: A retargetable embedded-software development environment. IEEE Design & Test of Computers, 19(4):59--69, 2002.
[14]
R. M. Stallman, R. Pesch, S. Shebs, et al. Debugging with GDB: The GNU Source-Level Debugger. Free Software Foundation, 2002.
[15]
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.
[16]
C. M. Tice. Non-transparent debugging of optimized code. Technical report, University of California at Berkeley, Berkeley, CA, USA, November 1999.
[17]
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.
[18]
C. M. Tice and S. L. Graham. Key instructions: Solving the code location problem for optimized code. 2000.
[19]
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.
[20]
L.-C. Wu. Interactive source-level debugging of optimized code. PhD thesis, 2000. Adviser-Wen-Mei W. Hwu.
[21]
P. T. Zellweger. Interactions between high-level debugging and optimised code. PhD thesis, Computer Science Division, University of California, Berkeley, 1984.
[22]
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.

Cited By

View all
  • (2011)WCET-Aware Source Code Level OptimizationsWorst-Case Execution Time Aware Compilation Techniques for Real-Time Systems10.1007/978-90-481-9929-7_4(61-129)Online publication date: 2011
  • (2010)Patching product line programsProceedings of the 2nd International Workshop on Feature-Oriented Software Development10.1145/1868688.1868694(33-40)Online publication date: 10-Oct-2010

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SCOPES '08: Proceedings of the 11th international workshop on Software & compilers for embedded systems
March 2008
88 pages
ISBN:9781450378437
DOI:10.1145/1361096
  • General Chair:
  • Heiko Falk
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 13 March 2008

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article

Conference

SCOPES08
Sponsor:

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)3
  • Downloads (Last 6 weeks)0
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2011)WCET-Aware Source Code Level OptimizationsWorst-Case Execution Time Aware Compilation Techniques for Real-Time Systems10.1007/978-90-481-9929-7_4(61-129)Online publication date: 2011
  • (2010)Patching product line programsProceedings of the 2nd International Workshop on Feature-Oriented Software Development10.1145/1868688.1868694(33-40)Online publication date: 10-Oct-2010

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media