Unwanted debugging -gdwarf-4 option set automatically in library projects by MCUXpresso

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Unwanted debugging -gdwarf-4 option set automatically in library projects by MCUXpresso

ソリューションへジャンプ
2,668件の閲覧回数
stefanct
Contributor IV

Building headless (via CDT's generic org.eclipse.cdt.managedbuilder.core.headlessbuild application) or opening a project's properties in the GUI adds the -gdwarf-4 option to the com.crt.advproject.gcc.lib.release.option.debugging.other setting of the currently active configuration in library projects.

While this setting also seems to be the default for executables, it does not get re-added there and I am not sure if it has the same effects when linking as with libraries. But with static libraries the resulting binaries are actually different as the debug info gets embedded into the object files that end up in the library, which is obviously unwanted.

0 件の賞賛
返信
1 解決策
2,518件の閲覧回数
AdrianOltean
NXP Employee
NXP Employee

I got your point. I'll recheck the way the Dwarf-related flag is enforced and do some improvements based on your inputs. We'll see if this fits in the upcoming IDE v11.10.0 release.

Thanks,

Adrian

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
2,619件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @stefanct 

For better resolve your issue, please tell us your chip number. And detail steps about how to reproduce you issue. 

 

BR

Alice

0 件の賞賛
返信
2,612件の閲覧回数
jackking
Senior Contributor I

I have this issue as well. 

On Mac OS Sonoma Version 14.2.1 with MCUXpresso IDE v11.9.0 [Build 2144] [2024-01-05] and MCUXpresso SDK Version 2.15.00 (801 2024-01-15) for MIMXRT1060-EVKB.

Any new SDK Example project has the -gdwarf-4 debug option set in the IDE even though this flag is not specified in the config of the example (XML) or in the .cproject file.

SCR-20240426-gdmw.png

0 件の賞賛
返信
2,575件の閲覧回数
AdrianOltean
NXP Employee
NXP Employee

Indeed, the IDE changes the implicit Dwarf format used by GCC. As you noticed, Dwarf 4 is now used instead of the default Dwarf 5. Long story short, this should not affect the actual code that's being generated, only the debug information is affected. We decided to enforce Dwarf 4 for debugging purposes, because of the many issues we've encountered with GDB, not being able to fully interpret Dwarf 5 (for now). If you want, you can always specify "-gdwarf-5" in the "Other debugging flags" field and the IDE will not change it in this case.

Regards,

Adrian

0 件の賞賛
返信
2,535件の閲覧回数
stefanct
Contributor IV
The problem is that this actually enforces debug information to be present in the binary (no matter what the other "Debug level" is set to), which is undesired in our case. Software overriding developers is never a good idea. A warning would be more appropriate IMHO. Checking the "Debug level" for non-"none" before setting the value would also improve things (for my case at least).
0 件の賞賛
返信
2,519件の閲覧回数
AdrianOltean
NXP Employee
NXP Employee

I got your point. I'll recheck the way the Dwarf-related flag is enforced and do some improvements based on your inputs. We'll see if this fits in the upcoming IDE v11.10.0 release.

Thanks,

Adrian

0 件の賞賛
返信