rohanrhu / gdb-frontend Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Startup issue on MacOS #37
Comments
|
Ah, one more thing, I realized I overlooked an error message earlier. When I connect to the tmux session, I see this: Note, that if I use the non So it appears that the python version that's part of arm-none-eabi-gdb doesn't support type hints. |
I just added a check for does GDB have embedded Python: 4fe1f5c This error means your GDB-embedded Python3 version is a little bit old, I will remove all Can you look for the output of this on GDB shell? We should find some quick solutions for different GDB distributions issues. I'm planning to add all kinds of GDB builds into the GDBFrontend releases. |
|
Ah, yes I think this is the issue: Even the latest arm-none-eabi-gdb 10.3 was compiled with python 2.7. So does gdbfrontend require python 3.x? |
Yes but GDB distributions are usually coming with Python3. Do you use a GDB from ARM? |
Yes, from here: I see there's a later release (October 2021, I am using July 2021 version), so I'll see if that has python 3. |
Ok I'm looking for what can I do for this. |
|
Aha! I downloaded a version compiled with Python 3 support from here: And the gdb-frontend web page opens up! I can confirm it uses python 3: I'm getting other errors now (python errors) but at least its running. Thanks for the help! |
Can you send errors? |
|
First error happens when I set the target: Next set of errors happens immediately afterwards. In my code, |
|
You can just ignore value errors. I will make it to handle and visualize all kinds of C++ objects but I have yet to do something for them. For now, I'm going to ignore this kind of value errors. Important thing is do you having any issues to connecting to GDBServer? I suggest you to run GDBFrontend on your remote machine and connect to it from your local machine. This will provide you a full-featured remote GDB debugging. That's one of the project's aims. If you having issues with connecting to GDBServer, I will look for it. One more thing, can you send your code? I will make it to handle and visualize them. |
|
I've built GDB 11.1 with target (I will make all-in-one further releases and also I will make a documentation for building all kinds of GDB) How to build GDB with a specific targetYou may need some build-time dependenciesI had to install Follow these stepscd ~
wget https://ftp.gnu.org/gnu/gdb/gdb-11.1.tar.xz
tar zxvf gdb-11.1.tar.gz
mkdir gdb-11.1-build
cd gdb-11.1-build
../gdb-11.1/configure --with-python=/usr/bin/python3 --target=arm-none-eabi --enable-interwork --enable-multilib
makeStarting GDBFrontend with your GDB buildAfter build is successful, you should can run GDBFrontend like this: gdbfrontend -g $(realpath ~/gdb-11.1-build/gdb/gdb) -G --data-directory=$(realpath ~/gdb-11.1-build/gdb/data-directory/)It looks like this: |
OK, it's understandable.
Seems to be working at least at the basic level. It connects and I can set breakpoints and issue gdb commands from the embedded terminal. I can also view variables. So I have manually type "target extended-remote localhost:2331" and then "load" at the start of every session, which works. (My .gdbinit is exactly those two commands, with a newline separating them.)
I'm not sure I understand. I'm running JLinkGDBServer as my gdb server. This connects to the J-Link device via USB, which in turn is connected to my target microcontroller via SWD. Since it's an embedded device with a hardware user interface (knobs, buttons, screen, jacks), I need to be physically in front of the target device in order to debug.
I can prepare something for you, to be shared privately. |
Ah... another code blocks to avoid their error printings... Seems like
I understand it. The only way is using JLinkGDBServer in this context.
Nice... I will clear unnecessary warnings and solve the issues left with next release.
It would be nice, I just need to see what kind of C++ types could not get handled and printing warnings. |
|
@danngreen hello, any update on this? |
|
Here is part of one library used in the project where I was getting a lot of errors: Unfortunately I can't share the entire project, but this library contains many of the types that produces errors. I don't think you'll be able to see the errors unless you step through the code using actual hardware (that's when I saw them, not when the elf file is loaded). I tried another project, but I get far fewer errors. I get a lot of "No symbol XXX in current context", which might just be from the variables being optimized out. Hope that helps. It's nice that you want to make this more useful for embedded projects, and I look forward to more releases/progress. |
|
Sooooo is the only problem is unnecessary warnings now? |
|
Yes, just those warnings like I posted a few comments back: I'm still on the macos-compatible branch, btw. |
There are so many updates :) I added the thing (realpath command) that exists in You can use I think i may be solved unnecessary warnings issue too with newer versions. There are also so many performance enhancements and some thread-safety issues are fixed. Can you try the latest revision on |
|
Ah, ok. I just pulled Should I re-open this? Or start a new issue? |
Oh, sure it would be better. Looks like we have some problems on MacOS. |
|
@danngreen can you provide more information about your environment? (like Python version and installation) |
|
The only gdb executable I've been able to get working is the one from xpack (#37 (comment)). So I'm using the arm-none-eabi-gdb-py3 version from that. I ran into compilation errors when trying to compile gcc v11.1 as you posted above. That's another issue in itself! From that gdb, the python version is: What other environment information would you like to know? |
|
Thank you for feedback. I will look at this. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.



I saw your post on /r/embedded and wanted to try this out.
I'm using macOS version 12.0.1.
I saw the other open macOS issue, but mine seems different. When I run gdb-frontend with a gdb executable specified, the browser window pops open but says :
Here is the command I'm calling:
./gdbfrontend --gdb-executable=/path/to/my/arm-none-eabi-gdb-pyin the terminal, it responds with this:
A new tab opens up in my browser with this address, but it just says it can't connect (default browser error message).
If I run
tmux a -t gdb-frontend, it connects me to the gdb session, and I can type gdb commands and debug as I normally would in command-line gdb. Everything seems to work correctly in this terminal gdb session. So I know gdb is working, and my path to the executable is correct.I'm able to use another gdb webserver/wrapper called
gdbgui: This works similarly and I can connect to 127.0.0.1:5550 (I can set the port to anything).Also, I can run just
gdbfrontendwithout any arguments. This opens a browser tab with the gdb-frontend UI (looks nice, BTW I hope I can get this working to really play with it!) But I need to use arm-none-eabi-gdb for embedded projects.Here's what I've tried. Nothing changes when I do any of these:
macos-compatibilitybranch and running./gdbfrontendin the root dir of the repo.--port=5678or other numbers to the gdbfrontend command--verboseand-V: no change in outputarm-none-eabi-gdbinstead of the-pyversion.-G "ARGS". I tried both CLI arguments to gdb (-G path/to/main.elf) and also gdb arguments (-G target extended-remote localhost:2331)Any ideas?
The text was updated successfully, but these errors were encountered: