3.8.6. Debug Format Considerations

This section provides information about the debug table formats that can be generated by the ARM C++ compilers. It also describes how to change the format of the debug tables generated.

The debug table format

The ARM C++ compiler provides a number of options for building debug images. You can use the Compiler Configuration window in APM to set these options. Figure 3.30 shows an example of the Compiler Configuration window.

Figure 3.30. Compiler configuration window

Compiler configuration window

By default, the C++ compiler produces DWARF2 format debug tables. The available formats are:

dwarf 2

This is the default format produced by APM for C++ projects. You should use this format unless you have specific reasons for using DWARF1.

dwarf 1

You should use this format only if you have specific reasons for doing so. For example, you may want to use a debugger that does not support DWARF2.


Do not use this format for C++. The ASD format cannot represent some C++ constructs, such as pointers to member functions. Using ASD will produce unpredictable results.

DWARF1 limitations

The DWARF1 debug table format has limitations that introduce severe restrictions to debugging C++ code. These include:

  • DWARF1 provides no support for #include files. Stepping into member functions defined in #include files, and setting breakpoints on such functions, results in incorrect behavior.

  • DWARF1 is less descriptive than DWARF2, and therefore has limited potential for building optimized debug images and objects.

  • DWARF1 produces a much larger debug table than DWARF2. As a result, DWARF1 images can be significantly slower to load than DWARF2 images.

For these reasons, it is recommended that you use the DWARF2 debug table format.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D