<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to control Dwarf level of GDB debugger in S32 Design Studio</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/How-to-control-Dwarf-level-of-GDB-debugger/m-p/2298438#M14035</link>
    <description>&lt;P&gt;I am using&lt;/P&gt;&lt;P&gt;S32 Design Studio for S32 Platform&amp;nbsp;&amp;nbsp;Version: 3.6.1&amp;nbsp;&amp;nbsp;Build id: 250327&lt;/P&gt;&lt;P&gt;In most of my code, when I try to set a breakpoint it works fine.&amp;nbsp; However, in some sections of code e.g. init code, I get this error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Breakpoint installation failed: invalid dwarf2 offset 0xa9be7&amp;nbsp; (Address is line-specific.)&lt;BR /&gt;This code is being compiled and linked separately, then imported into a S32 project. Our settings default to dwarf4.&amp;nbsp; According to documentation, GDB debugger should read the elf file and determine dwarf level automatically, and should support dwarf4.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found where to set dwarf level in compiler settings (though we don't use compiler) in case it might work, but I can't find any way to set dwarf level in GDB debugger.&lt;BR /&gt;Why doesn't GDB debugger seem to properly support dwarf4?&amp;nbsp; Is there any way to set the debugger's dwarf level?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jan 2026 15:21:23 GMT</pubDate>
    <dc:creator>Tuhl</dc:creator>
    <dc:date>2026-01-22T15:21:23Z</dc:date>
    <item>
      <title>How to control Dwarf level of GDB debugger</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/How-to-control-Dwarf-level-of-GDB-debugger/m-p/2298438#M14035</link>
      <description>&lt;P&gt;I am using&lt;/P&gt;&lt;P&gt;S32 Design Studio for S32 Platform&amp;nbsp;&amp;nbsp;Version: 3.6.1&amp;nbsp;&amp;nbsp;Build id: 250327&lt;/P&gt;&lt;P&gt;In most of my code, when I try to set a breakpoint it works fine.&amp;nbsp; However, in some sections of code e.g. init code, I get this error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Breakpoint installation failed: invalid dwarf2 offset 0xa9be7&amp;nbsp; (Address is line-specific.)&lt;BR /&gt;This code is being compiled and linked separately, then imported into a S32 project. Our settings default to dwarf4.&amp;nbsp; According to documentation, GDB debugger should read the elf file and determine dwarf level automatically, and should support dwarf4.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found where to set dwarf level in compiler settings (though we don't use compiler) in case it might work, but I can't find any way to set dwarf level in GDB debugger.&lt;BR /&gt;Why doesn't GDB debugger seem to properly support dwarf4?&amp;nbsp; Is there any way to set the debugger's dwarf level?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 15:21:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/How-to-control-Dwarf-level-of-GDB-debugger/m-p/2298438#M14035</guid>
      <dc:creator>Tuhl</dc:creator>
      <dc:date>2026-01-22T15:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to control Dwarf level of GDB debugger</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/How-to-control-Dwarf-level-of-GDB-debugger/m-p/2298596#M14036</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/250045"&gt;@Tuhl&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not an expert on this topic, but I wanted to share some information that may be helpful.&lt;/P&gt;
&lt;P&gt;Debuggers themselves cannot change the DWARF version; they only read and interpret the debug information that is already included in the ELF file.&lt;/P&gt;
&lt;P&gt;When using GCC, the DWARF version is selected during compilation and can be explicitly set using compiler options (see the references below).&lt;/P&gt;
&lt;P&gt;&lt;A href="https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html" target="_blank" rel="noopener"&gt;GCC -&amp;nbsp;Options for Debugging Your Program&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/MCUXpresso-IDE/Unwanted-debugging-gdwarf-4-option-set-automatically-in-library/m-p/1852587" target="_blank" rel="noopener"&gt;Unwanted debugging -gdwarf-4 option set automatically in library projects by MCUXpresso&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developer.arm.com/documentation/dui0774/l/Compiler-Command-line-Options/-g---gdwarf-2---gdwarf-3---gdwarf-4" target="_blank" rel="noopener"&gt;-g, -gdwarf-2, -gdwarf-3, -gdwarf-4&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If no DWARF version is specified, the compiler will fall back to its default, which depends on the compiler version.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR, VaneB&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2026 23:03:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/How-to-control-Dwarf-level-of-GDB-debugger/m-p/2298596#M14036</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2026-01-22T23:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to control Dwarf level of GDB debugger</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/How-to-control-Dwarf-level-of-GDB-debugger/m-p/2299374#M14039</link>
      <description>OK Thank you! I had begun to realize that maybe our compiler was defaulting to a later version like dwarf5, and the SW is not reporting dwarf2 based on a read of the elf file; instead it is assuming its too old and returning the highest level it doesn't support. If it doesn't support dwarf5 it doesn't know the version exists. I need to determine for sure the exact default dwarf level, and I haven't yet found it in the compiler documentation.</description>
      <pubDate>Fri, 23 Jan 2026 16:47:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/How-to-control-Dwarf-level-of-GDB-debugger/m-p/2299374#M14039</guid>
      <dc:creator>Tuhl</dc:creator>
      <dc:date>2026-01-23T16:47:50Z</dc:date>
    </item>
  </channel>
</rss>

