<?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>MCUXpresso IDE中的主题 Re: MCUXpresso debug view showing incorrect variable names</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1227023#M6669</link>
    <description>&lt;P&gt;-ffunction-sections is a &lt;STRONG&gt;compiler&lt;/STRONG&gt; option to place functions into Individual sections&lt;/P&gt;&lt;P&gt;--gc-sections is a &lt;STRONG&gt;linker&lt;/STRONG&gt; option to remove unused sections&lt;/P&gt;&lt;P&gt;When the linker removes unused sections it does not always correctly remove the corresponding debug information associated with that removal. This can lead to all sorts of weird issues (it can remove the wrong debug information, or misalign it, for example), including the one you are seeing&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Feb 2021 09:18:56 GMT</pubDate>
    <dc:creator>converse</dc:creator>
    <dc:date>2021-02-05T09:18:56Z</dc:date>
    <item>
      <title>MCUXpresso debug view showing incorrect variable names</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1226463#M6658</link>
      <description>&lt;P&gt;I searched the forum before, but didn't find any matching the issues I have.&lt;/P&gt;&lt;P&gt;I am using&amp;nbsp;MCUXpresso IDE v11.1.1 [Build 3241] [2020-03-02], with an OM13098 board (LPCXpresso54628) as hardware.&lt;/P&gt;&lt;P&gt;I am not seeing correct local variables, especially variable names, and I con't see what I am doing wrong.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="frank_meyer_0-1612447663222.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/136526iB03803A940BB9277/image-size/medium?v=v2&amp;amp;px=400" role="button" title="frank_meyer_0-1612447663222.png" alt="frank_meyer_0-1612447663222.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;frank_meyer_0-1612447663222.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As seen, the names in the variable view do not match the names declared in the current function at all. Nor does their number. Some are updated while stepping through, and the value and change seems plausible. Which would IMHO indicate the debugger is in the right stack frame.&lt;/P&gt;&lt;P&gt;Has anybody experienced such an issue ?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 14:13:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1226463#M6658</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2021-02-04T14:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso debug view showing incorrect variable names</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1226495#M6659</link>
      <description>&lt;P&gt;What does the stack frame show (the Debug view in the IDE). Does it think you are in the LCD_DrawChar function? If yes, do you have any functions that are inlined? Do you have any other threads? Are you running non-stop debugging?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 15:13:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1226495#M6659</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2021-02-04T15:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso debug view showing incorrect variable names</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1226517#M6661</link>
      <description>&lt;P&gt;Thanks for the quick resonse.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;gt; Does it think you are in the LCD_DrawChar function?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I would think so:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="frank_meyer_0-1612452735353.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/136533i9F79DB872C7AC963/image-size/medium?v=v2&amp;amp;px=400" role="button" title="frank_meyer_0-1612452735353.png" alt="frank_meyer_0-1612452735353.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;frank_meyer_0-1612452735353.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;No there are no inlined functions.&lt;/P&gt;&lt;P&gt;Doing a search for the displayed variable names, they all show up in another function of the same module, which is never called. Which I find a bit confusing ...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="frank_meyer_1-1612453047770.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/136534i18A061942D12D35A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="frank_meyer_1-1612453047770.png" alt="frank_meyer_1-1612453047770.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;frank_meyer_1-1612453047770.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There are no threads either, and I just do breakpoints and single-step.&lt;/P&gt;&lt;P&gt;My experiences with non-stop debugging or realtime update (or however it is called) had ... not been so good. At least on other toolchains.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 15:43:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1226517#M6661</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2021-02-04T15:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso debug view showing incorrect variable names</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1226543#M6662</link>
      <description>&lt;P&gt;What level of Debug (-g?) and optimisation (-O?) do you have on your build?&lt;/P&gt;&lt;P&gt;Also, do you have ---gc-sections in the linker? This can cause problems with the debug symbol table (removes unused functions from the image, but is not always successful at removing its associated debug symbols!) - try removing --gc-sections from your debug build (although it will increase the size of your image).&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 17:03:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1226543#M6662</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2021-02-04T17:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso debug view showing incorrect variable names</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1226837#M6666</link>
      <description>&lt;P&gt;Except for a few sources (including the one containing shown function), this is the unmodified lcdc_tft example from the SDK.&lt;/P&gt;&lt;P&gt;Default settings I had been using are O0 (no optimisation) and "--gc-sections" defined. Which, if I remember correctly, places functions in individual section, for easier removal by the linker.&lt;/P&gt;&lt;P&gt;Going to experiment with this settings, albeit I still don't understand why the debugger loads wrong symbols ...&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 06:17:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1226837#M6666</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2021-02-05T06:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso debug view showing incorrect variable names</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1227023#M6669</link>
      <description>&lt;P&gt;-ffunction-sections is a &lt;STRONG&gt;compiler&lt;/STRONG&gt; option to place functions into Individual sections&lt;/P&gt;&lt;P&gt;--gc-sections is a &lt;STRONG&gt;linker&lt;/STRONG&gt; option to remove unused sections&lt;/P&gt;&lt;P&gt;When the linker removes unused sections it does not always correctly remove the corresponding debug information associated with that removal. This can lead to all sorts of weird issues (it can remove the wrong debug information, or misalign it, for example), including the one you are seeing&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:18:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1227023#M6669</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2021-02-05T09:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso debug view showing incorrect variable names</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1227049#M6671</link>
      <description>&lt;P&gt;This would make sense.&lt;/P&gt;&lt;P&gt;In the meantime I had simply removed some of the "offending" functions, and the problem was gone. The forum has swallowed my respective post, though ...&lt;/P&gt;&lt;P&gt;Over the weekend, I try another IDE installation I have, a recent version running under Linux.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 09:54:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1227049#M6671</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2021-02-05T09:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso debug view showing incorrect variable names</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1227992#M6678</link>
      <description>&lt;P&gt;FYI, I tried the latest toolchain version (11.3.0, if I remember correctly), and it made no difference.&lt;/P&gt;&lt;P&gt;The problem was the same, and the workaround as well.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 13:34:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1227992#M6678</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2021-02-08T13:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso debug view showing incorrect variable names</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1228008#M6679</link>
      <description>&lt;P&gt;I'm not surprised - this is a persistent problem with the GNU toolchain. I've been using GNU for over 10 years and it still occasionally bites me. Generally it works but it does (for no known reason) get it wrong on occasions. Sometimes, just re-ordering the functions in a module is sufficient to 'fix' the issue.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 13:49:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1228008#M6679</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2021-02-08T13:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: MCUXpresso debug view showing incorrect variable names</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1228045#M6680</link>
      <description>&lt;P&gt;I was a bit surprised, actually. Dabbling about a decade in the embedded business (and occasionally with gcc toolchains), I never came across this issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For private purposes, I often use the gcc-based Crossworks - which never had this problem, despite intensive usage. My companies payed dearly for uVision or IAR-WB licenses, which have their own compilers.&lt;/P&gt;&lt;P&gt;However, the free toolchains to push a vendor's hardware seems to have been putting bugfixing on the back burner... I know toolchains quite a bit worse than MCUXpresso.&lt;/P&gt;&lt;P&gt;Hoping it can at least be helpful for others, I'm putting an and to the discussion ... &lt;LI-EMOJI id="lia_winking-face" title=":winking_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 14:56:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/MCUXpresso-debug-view-showing-incorrect-variable-names/m-p/1228045#M6680</guid>
      <dc:creator>frank_m</dc:creator>
      <dc:date>2021-02-08T14:56:13Z</dc:date>
    </item>
  </channel>
</rss>

