Debug information and high optimization

Technical Note 62015

Arkitekturer:

ARM

Komponent:

debugger

Uppdaterad:

2015-11-06 14:27

Introduction

This Technical Note discusses which information in C-SPY that is reliable (and which is unreliable) at optimization level 'high'.

Background

The optimization system in IAR C /C++ Compiler consists of different parts that aim to make as small and/or fast output as possible. When these parts are enabled, the debug information that the compiler generates become less and less reliable.

Reliable information...

...comes from C-SPY windows that shows information collected from the target system. For example the following windows:

  • Disassembly window 
  • Memory window
  • Register window
  • Stack window
  • Call Stack window

Reliable (most of the time) information

These windows are reliable most of the time, but any write might have been moved due to optimzations. That is, a write of a value might not have been done yet. This applies to for example the following windows:

  • Statics window
  • Symbolic Memory window
  • Symbols window

Unreliable information

C-SPY windows that shows information based on debug information becomes unreliable. For example the follwoing windows:

  • Watch window
  • Locals window
  • Auto window
  • Live Watch windows
  • Quick Watch window

More information

More information can be found in Help > C-SPY Debugging Guide, chapter "Effects of optimizations" and also Help > C/C++ Development Guide, chapter "Optimization Levels".

 

All product names are trademarks or registered trademarks of their respective owners.

 

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av iar.com rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.