Giter Site home page Giter Site logo

Comments (8)

jonahgraham avatar jonahgraham commented on June 12, 2024 1

Thanks @silabs-daperez for coming back to this. I am going to close this issue as the bug is in GDB. I am glad you have a workaround.

from eclipse-plugins.

jonahgraham avatar jonahgraham commented on June 12, 2024

This bug, while showing up while you are using embed-cdt is almost certainly from the partner project Eclipse CDT.

Can you supply the gdb traces of the issue please?

Coincidentally I have just been looking at a similar issue and see that CDT has numerous places where, when communicating with GDB, there are encoding differences that are not properly accounted for. For example, even if you manage to launch you are likely to hit other problems such as setting breakpoints in such files.

The workaround is to use a workspace path with only ASCII characters.

It is likely that this is the workaround that will be needed for a while. However we can get a proper solution faster if you can contribute some PRs?

The other mitigation that is employed by some vendors is to prevent creation of projects with non-ASCII characters in the first place.

from eclipse-plugins.

silabs-daperez avatar silabs-daperez commented on June 12, 2024

Thank you, Jonah!

Questions & Answers

Can you supply the gdb traces of the issue please?

Please see the GDB traces at the bottom of this post.

For example, even if you manage to launch you are likely to hit other problems such as setting breakpoints in such files.

Yes, we've encountered such scenarios as well. One that we're reproduced is after GDB launches successfully, it cannot display source code because the SourceLocator failed with workspace path that has extended ASCII characters.

However we can get a proper solution faster if you can contribute some PRs?

I can try. Where are the instructions for applying for CDT committer status? Does CDT committer status extend to Eclipse Embed CDT, or are they separate?

GDB Traces

Here's the trace for my failed GDB session launch.

135,414 2-gdb-show language
135,418 2^done,value="auto"
135,418 (gdb)
135,419 3-data-evaluate-expression "sizeof (void*)"
135,433 3^done,value="4"
135,433 (gdb)
135,434 4-gdb-set language auto
135,449 4^done
135,449 (gdb)
135,450 5-interpreter-exec console "show endian"
135,465 ~"The target endianness is set automatically (currently little endian).\n"
135,465 5^done
135,465 (gdb)
135,467 6-gdb-version
135,481 ~"GNU gdb (GNU Arm Embedded Toolchain 10.3-2021.10) 10.2.90.20210621-git\n"
135,481 ~"Copyright (C) 2021 Free Software Foundation, Inc.\n"
135,481 ~"License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html\nThis is fre
e software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitt
ed by law."
135,481 ~"\nType "show copying" and "show warranty" for details.\n"
135,481 ~"This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".\n"
135,481 ~"Type "show configuration" for configuration details.\n"
135,481 ~"For bug reporting instructions, please see:\n"
135,481 ~"https://www.gnu.org/software/gdb/bugs/.\n"
135,481 ~"Find the GDB manual and other documentation resources online at:\n <http://www.gnu.org/\
software/gdb/documentation/>."
135,481 ~"\n\n"
135,482 ~"For help, type "help".\n"
135,482 ~"Type "apropos word" to search for commands related to "word".\n"
135,482 6^done
135,482 (gdb)
135,484 7-environment-cd C:/SiliconLabs/workspaces/étudiant_Test/project_name
135,497 7^error,msg="C:/SiliconLabs/workspaces/\303\251tudiant_Test/project_name: No such file or d
irectory."
135,498 (gdb)
135,499 8-gdb-exit
135,513 8^exit

from eclipse-plugins.

TommyMurphyTM1234 avatar TommyMurphyTM1234 commented on June 12, 2024

Does GDB work standalone (in a terminal without any associated Eclipse/CDT/Embedded CDT) when using such paths/filenames containing accented characters? Ditto for OpenOCD assuming that you're using it?

I suspect that many tools may not deal with such characters well.

Edit: oh, judging by the first post you're using J-Link and not OpenOCD?

from eclipse-plugins.

jonahgraham avatar jonahgraham commented on June 12, 2024

I can try. Where are the instructions for applying for CDT committer status?

No special status is needed to contribute a Pull Request - only that you have a valid ECA on file with the Eclipse Foundation.

135,484 7-environment-cd C:/SiliconLabs/workspaces/étudiant_Test/project_name
135,497 7^error,msg="C:/SiliconLabs/workspaces/\303\251tudiant_Test/project_name: No such file or d
irectory."

Looks like encoding of the é is inconsistent and therefore it comes out wrong. This is the same issue as microsoft/vscode-cpptools#1998 for VSCode and there the workaround was to ensure Windows is set to UTF-8 - microsoft/vscode-cpptools#1998 (comment) - interestingly vscode-cpptools have closed the issue pointing back at fixes needed in GDB. @TommyMurphyTM1234's question is quite relevant here, if you cannot do the -environment-cd when running gdb outside of Eclipse (in MI mode), then there isn't anything we can do in CDT.

from eclipse-plugins.

silabs-daperez avatar silabs-daperez commented on June 12, 2024
  • Thanks for the feedback so far. I see your point.
  • The GDB client we are using is version 10.2.90.20210621-git, which we obtained from GNU Arm Embedded Toolchain 10.3-2021.10.
  • I tried your suggestion of using GDB outside of Eclipse. I launched the GDB client on command line with arguments --interpreter=mi --nx. Then I ran the file <path_to_program> command to load the program from command line, but it fails to handle the path with extended ASCII characters, resulting in error No such file or directory.. See command line output further below.
  • I'll try upgrading the GDB client to a newer version to see if that resolves the issue.

$ arm-none-eabi-gdb.exe --interpreter=mi --nx
arm-none-eabi-gdb.exe: warning: Couldn't determine a path for the index cache directory.
=thread-group-added,id="i1"
~"GNU gdb (GNU Arm Embedded Toolchain 10.3-2021.10) 10.2.90.20210621-git\n"
~"Copyright (C) 2021 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
~"\nType "show copying" and "show warranty" for details.\n"
~"This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".\n"
~"Type "show configuration" for configuration details.\n"
~"For bug reporting instructions, please see:\n"
~"https://www.gnu.org/software/gdb/bugs/.\n"
~"Find the GDB manual and other documentation resources online at:\n http://www.gnu.org/software/gdb/documentation/."
~"\n\n"
~"For help, type "help".\n"
~"Type "apropos word" to search for commands related to "word".\n"
(gdb)
file C:/SiliconLabs/workspaces/étudiant_Test/project_name/GNU\ ARM\ v10.3.1\ -\ Default/project_name.axf
&"file C:/SiliconLabs/workspaces/\202tudiant_Test/project_name/GNU\ ARM\ v10.3.1\ -\ Default/project_name.axf\n"
&"C:/SiliconLabs/workspaces/\202tudiant_Test/project_name/GNU ARM v10.3.1 - Default/project_name.axf: No such file or directory.\n"
^error,msg="C:/SiliconLabs/workspaces/\202tudiant_Test/project_name/GNU ARM v10.3.1 - Default/project_name.axf: No such file or directory."
(gdb)

from eclipse-plugins.

TommyMurphyTM1234 avatar TommyMurphyTM1234 commented on June 12, 2024
  • The GDB client we are using is version 10.2.90.20210621-git, which we obtained from GNU Arm Embedded Toolchain 10.3-2021.10.

GNU ARM Embedded seems to have stopped at 10.2

and been superseded by the Arm GNU Toolchain:

You could also try @ilg-ul's xPack toolchain:

  • I tried your suggestion of using GDB outside of Eclipse. I launched the GDB client on command line with arguments --interpreter=mi --nx. Then I ran the file <path_to_program> command to load the program from command line, but it fails to handle the path with extended ASCII characters, resulting in error No such file or directory.. See command line output further below.

So it sounds like GDB itself also (?) has problems handling "extended" characters?
So there may be several layers of tools that need to be updated to deal with this which is probably not a trivial task.

from eclipse-plugins.

silabs-daperez avatar silabs-daperez commented on June 12, 2024

Status Update

Console Output: Arm GNU Toolchain 12.2.Rel1

$arm-none-eabi-gdb.exe --interpreter=mi --nx
=thread-group-added,id="i1"
~"GNU gdb (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.1.90.20221210-git\n"
~"Copyright (C) 2022 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
~"\nType "show copying" and "show warranty" for details.\n"
~"This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".\n"
~"Type "show configuration" for configuration details.\n"
~"For bug reporting instructions, please see:\n"
~"https://bugs.linaro.org/.\n"
~"Find the GDB manual and other documentation resources online at:\n http://www.gnu.org/software/gdb/documentation/."
~"\n\n"
~"For help, type "help".\n"
~"Type "apropos word" to search for commands related to "word".\n"
(gdb)
file C:/SiliconLabs/workspaces/étudiant_Test/mg22_Z3Switch/GNU\ ARM\ v10.3.1\ -\ Default/mg22_Z3Switch.axf
&"file C:/SiliconLabs/workspaces/\202tudiant_Test/mg22_Z3Switch/GNU\ ARM\ v10.3.1\ -\ Default/mg22_Z3Switch.axf\n"
&"C:/SiliconLabs/workspaces/\202tudiant_Test/mg22_Z3Switch/GNU ARM v10.3.1 - Default/mg22_Z3Switch.axf: No such file or directory.\n"
^error,msg="C:/SiliconLabs/workspaces/\202tudiant_Test/mg22_Z3Switch/GNU ARM v10.3.1 - Default/mg22_Z3Switch.axf: No such file or directory."
(gdb)
quit
&"quit\n"

Console Output: xpack-arm-none-eabi-gcc-12.2.1-1.2-win32-x64

$arm-none-eabi-gdb.exe --interpreter=mi --nx
=thread-group-added,id="i1"
~"GNU gdb (xPack GNU Arm Embedded GCC x86_64) 12.1.90.20221210-git\n"
~"Copyright (C) 2022 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law."
~"\nType "show copying" and "show warranty" for details.\n"
~"This GDB was configured as "--host=x86_64-w64-mingw32 --target=arm-none-eabi".\n"
~"Type "show configuration" for configuration details.\n"
~"For bug reporting instructions, please see:\n"
~"https://www.gnu.org/software/gdb/bugs/.\n"
~"Find the GDB manual and other documentation resources online at:\n http://www.gnu.org/software/gdb/documentation/."
~"\n\n"
~"For help, type "help".\n"
~"Type "apropos word" to search for commands related to "word".\n"
(gdb)
file C:/SiliconLabs/workspaces/étudiant_Test/mg22_Z3Switch/GNU\ ARM\ v10.3.1\ -\ Default/mg22_Z3Switch.axf
&"file C:/SiliconLabs/workspaces/\202tudiant_Test/mg22_Z3Switch/GNU\ ARM\ v10.3.1\ -\ Default/mg22_Z3Switch.axf\n"
&"C:/SiliconLabs/workspaces/\202tudiant_Test/mg22_Z3Switch/GNU ARM v10.3.1 - Default/mg22_Z3Switch.axf: No such file or directory.\n"
^error,msg="C:/SiliconLabs/workspaces/\202tudiant_Test/mg22_Z3Switch/GNU ARM v10.3.1 - Default/mg22_Z3Switch.axf: No such file or directory."
(gdb)

from eclipse-plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.