diff options
author | Manish Pandey <manish.pandey2@arm.com> | 2022-05-24 15:30:27 +0200 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2022-05-24 15:30:27 +0200 |
commit | 10534b3edae386cbb213fddc164a26cc144178a6 (patch) | |
tree | f0f2b772320393f2868a554294178699cbed5b62 | |
parent | f7ad7434708ade77aa0a5e8b4b3432cbab6082af (diff) | |
parent | 4466cf8255aef834e79e5d69ddc4fbd71f6e3236 (diff) | |
download | arm-trusted-firmware-10534b3edae386cbb213fddc164a26cc144178a6.tar.gz |
Merge "fix(build): use DWARF 4 when building debug" into integration
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | docs/getting_started/build-options.rst | 12 | ||||
-rw-r--r-- | docs/getting_started/prerequisites.rst | 5 |
3 files changed, 10 insertions, 16 deletions
@@ -307,13 +307,8 @@ endif $(eval $(call add_define,DEBUG)) ifneq (${DEBUG}, 0) BUILD_TYPE := debug - TF_CFLAGS += -g - - ifneq ($(findstring clang,$(notdir $(CC))),) - ASFLAGS += -g - else - ASFLAGS += -g -Wa,--gdwarf-2 - endif + TF_CFLAGS += -g -gdwarf-4 + ASFLAGS += -g -Wa,-gdwarf-4 # Use LOG_LEVEL_INFO by default for debug builds LOG_LEVEL := 40 diff --git a/docs/getting_started/build-options.rst b/docs/getting_started/build-options.rst index be50e5edf..cfd7201c3 100644 --- a/docs/getting_started/build-options.rst +++ b/docs/getting_started/build-options.rst @@ -1051,11 +1051,11 @@ To compile a debug version and make the build more verbose use make PLAT=<platform> DEBUG=1 V=1 all -AArch64 GCC uses DWARF version 4 debugging symbols by default. Some tools (for -example DS-5) might not support this and may need an older version of DWARF -symbols to be emitted by GCC. This can be achieved by using the -``-gdwarf-<version>`` flag, with the version being set to 2 or 3. Setting the -version to 2 is recommended for DS-5 versions older than 5.16. +AArch64 GCC 11 uses DWARF version 5 debugging symbols by default. Some tools +(for example Arm-DS) might not support this and may need an older version of +DWARF symbols to be emitted by GCC. This can be achieved by using the +``-gdwarf-<version>`` flag, with the version being set to 2, 3, 4 or 5. Setting +the version to 4 is recommended for Arm-DS. When debugging logic problems it might also be useful to disable all compiler optimizations by using ``-O0``. @@ -1080,7 +1080,7 @@ It is also possible to introduce an infinite loop to help in debugging the post-BL2 phase of TF-A. This can be done by rebuilding BL1 with the ``SPIN_ON_BL1_EXIT=1`` build flag. Refer to the :ref:`build_options_common` section. In this case, the developer may take control of the target using a -debugger when indicated by the console output. When using DS-5, the following +debugger when indicated by the console output. When using Arm-DS, the following commands can be used: :: diff --git a/docs/getting_started/prerequisites.rst b/docs/getting_started/prerequisites.rst index c625090e7..0b8a71cbc 100644 --- a/docs/getting_started/prerequisites.rst +++ b/docs/getting_started/prerequisites.rst @@ -7,7 +7,6 @@ AArch32 and AArch64 target platforms. It may possible to build |TF-A| with combinations of software packages that are different from those listed below, however only the software described in this document can be officially supported. - Build Host ---------- @@ -71,7 +70,7 @@ These tools are optional: source files (``.dts`` files). DTC is available for Linux through the package repositories of most distributions. -- Arm `Development Studio 5 (DS-5)`_ +- Arm `Development Studio (Arm-DS)`_ The standard software package used for debugging software on Arm development platforms and |FVP| models. @@ -166,5 +165,5 @@ documentation, available `here <https://git-scm.com/docs/githooks>`_. .. _Gerrit Code Review: https://www.gerritcodereview.com/ .. _Linaro Release Notes: https://community.arm.com/dev-platforms/w/docs/226/old-release-notes .. _Linaro instructions: https://community.arm.com/dev-platforms/w/docs/304/arm-reference-platforms-deliverables -.. _Development Studio 5 (DS-5): https://developer.arm.com/products/software-development-tools/ds-5-development-studio +.. _Development Studio (Arm-DS): https://developer.arm.com/Tools%20and%20Software/Arm%20Development%20Studio .. _Linaro Release 20.01: http://releases.linaro.org/members/arm/platforms/20.01 |