Open lukehutch opened 3 years ago
There is an error being raised which is likely the cause of this:
AttributeError: 'Semaphore' object has no attribute '_at_fork_reinit'
Could you try downloading and running a prebuilt release from the GitHub releases page?
@cs01 I really appreciate the quick response.
I'm not sure what is going on here...
$ /opt/gdbgui_0.14.0.2 --debug -g /opt/arduino-1.8.13/hardware/tools/arm/bin/arm-none-eabi-gdb --args /tmp/arduino_build_637692/Test_Teensy.ino.elf
failed to initialize socketio app with async mode "eventlet". Continuing with async mode "threading".
View gdbgui at http://127.0.0.1:5000
View gdbgui dashboard at http://127.0.0.1:5000/dashboard
exit gdbgui by pressing CTRL+C
(2021-05-17 19:38:39,449) WebSocket transport not available. Install eventlet or gevent and gevent-websocket for improved performance.
(2021-05-17 19:38:39,450) * Running on %s://%s:%d/ %s
(2021-05-17 19:38:39,450) * Restarting with stat
usage: gdbgui_0.14.0.2 [-h] [-g GDB_CMD] [-p PORT] [--host HOST] [-r]
[--auth-file AUTH_FILE] [--user USER]
[--password PASSWORD] [--key KEY] [--cert CERT]
[--remap-sources REMAP_SOURCES] [--project PROJECT]
[-v] [-n] [-b BROWSER] [--debug] [--args ...]
[debug_program]
gdbgui_0.14.0.2: error: argument --args: not allowed with argument debug_program
$ /opt/gdbgui_0.14.0.2 --debug -g /opt/arduino-1.8.13/hardware/tools/arm/bin/arm-none-eabi-gdb /tmp/arduino_build_637692/Test_Teensy.ino.elf
failed to initialize socketio app with async mode "eventlet". Continuing with async mode "threading".
View gdbgui at http://127.0.0.1:5000
View gdbgui dashboard at http://127.0.0.1:5000/dashboard
exit gdbgui by pressing CTRL+C
(2021-05-17 19:48:57,693) WebSocket transport not available. Install eventlet or gevent and gevent-websocket for improved performance.
(2021-05-17 19:48:57,694) * Running on %s://%s:%d/ %s
(2021-05-17 19:48:57,694) * Restarting with stat
usage: gdbgui_0.14.0.2 [-h] [-g GDB_CMD] [-p PORT] [--host HOST] [-r]
[--auth-file AUTH_FILE] [--user USER]
[--password PASSWORD] [--key KEY] [--cert CERT]
[--remap-sources REMAP_SOURCES] [--project PROJECT]
[-v] [-n] [-b BROWSER] [--debug] [--args ...]
[debug_program]
gdbgui_0.14.0.2: error: unrecognized arguments: /tmp/arduino_build_637692/Test_Teensy.ino.elf
Hmm not sure what’s going on with that, but you can see available options with the “—help” flag and go from there.
@cs01 removing the --debug
fixed the errors in my previous comment. (I had that option added because of #382, in the pip version -- but the prebuilt latest release version doesn't seem to need that option anymore, so maybe you can close that bug.)
However, the prebuilt latest build version still can't read the symbols from the binary.
Command:
$ /opt/gdbgui_0.14.0.2 -g /opt/arduino-1.8.13/hardware/tools/arm/bin/arm-none-eabi-gdb /tmp/arduino_build_637692/Test_Teensy.ino.elf
First pane:
running command: /opt/arduino-1.8.13/hardware/tools/arm/bin/arm-none-eabi-gdb
GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160923-cvs
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Undefined command: "new-ui". Try "help".
(gdb) target remote /dev/ttyACM1
Remote debugging using /dev/ttyACM1
Register 25 is not available
0x00000184 in ?? ()
Second pane:
gdbgui output (read-only)
Copy/Paste available in all terminals with ctrl+shift+c, ctrl+shift+v
Started new gdb process, pid 3182761
No gdb response received after 10 seconds.
Possible reasons include:
1) gdbgui, gdb, or the debugged process is not running.
2) gdb or the inferior process is busy running and needs to be interrupted (press the pause button up top).
3) Something is just taking a long time to finish and respond back to this browser window, in which case you can just keep waiting.
I figured out some more things...
From the gdbgui help:
usage: gdbgui_0.14.0.2 [-h] [-g GDB_CMD] [-p PORT] [--host HOST] [-r] [--auth-file AUTH_FILE] [--user USER] [--password PASSWORD] [--key KEY] [--cert CERT] [--remap-sources REMAP_SOURCES] [--project PROJECT] [-v] [-n] [-b BROWSER] [--debug] [--args ...] [debug_program]
No matter what I put as --args
or [debug_program]
, it is ignored.
But the commandline options do seem to be passed through to the gdbgui.html
template OK -- from the web source for the request for /
, the JSON parameter is initial_binary_and_args
:
initial_data = {"csrf_token": "...", "gdb_command": "/opt/arduino-1.8.13/hardware/tools/arm/bin/arm-none-eabi-gdb", "gdbgui_version": "0.14.0.2", "gdbpid": 0, "initial_binary_and_args": ["/tmp/arduino_build_637692/Test_Teensy.ino.elf"], "project_home": null, "remap_sources": {}, "signals": {...}, "themes": ["monokai", "light"], "using_windows": false}
@cs01 As far as I can tell, the initial_binary_and_args
arg is ignored by gdbgui:
app.config["gdb_command"]
is used, but app.config["initial_binary_and_args"]
is not used to start a new gdb session.
Describe the bug I am trying to use gdbgui with TeensyDebug, a gdb stub for the Teensy SBC: https://github.com/ftrias/TeensyDebug
When I run with gdbgui rather than gdb, gdbgui is not able to read the symbols from the executable.
Running under commandline gdb:
Command:
gdb session:
Running under gdbgui:
Commandline:
First pane:
Second pane:
To Reproduce See above
Expected behavior gdbgui should work exactly the same as commandline gdb
Please complete the following information:
gdbgui -v
): 0.14.0.2gdb -v
): GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160923-cvspip freeze
): actionlib==1.13.2 angles==1.9.13 argcomplete==1.12.0 bcrypt==3.1.7 beautifulsoup4==4.9.3 blivet==3.3.0 blivet-gui==2.2.1 bondpy==1.8.6 Brotli==1.0.9 catfish==4.16.0 catkin==0.8.9 catkin-pkg==0.4.23 cffi==1.14.1 chardet==3.0.4 click==8.0.0 coverage==5.3 cryptography==3.2.1 cupshelpers==1.0 cv-bridge==1.15.0 cycler==0.10.0 dasbus==1.4 dbus-python==1.2.16 decorator==4.4.2 defusedxml==0.7.0rc2 diagnostic-analysis==1.10.2 diagnostic-common-diagnostics==1.10.2 diagnostic-updater==1.10.2 distro==1.5.0 dnspython==2.1.0 docutils==0.16 dynamic-reconfigure==1.7.1 empy==3.3.4 eventlet==0.25.2 Flask==0.12.5 Flask-Compress==1.9.0 Flask-SocketIO==2.9.6 fluidity-sm==0.2.0 gdbgui==0.14.0.2 gencpp==0.6.5 geneus==3.0.0 genlisp==0.4.18 genmsg==0.5.16 gennodejs==2.0.2 genpy==0.6.14 gevent==1.5.0 gevent-websocket==0.10.1 gpg==1.14.0 gps==3.20 greenlet==0.4.16 humanize==0.5.1 idna==2.10 img2pdf==0.3.4 initial-setup==0.3.83 interactive-markers==1.12.0 invoke==1.4.1 iotop==0.6 itsdangerous==2.0.0 Jinja2==3.0.0 joint-state-publisher==1.15.0 joint-state-publisher-gui==1.15.0 kiwisolver==1.3.1 langtable==0.0.54 laser-geometry==1.6.5 lexicon==1.0.0 libcomps==0.1.15 lxml==4.5.1 MarkupSafe==2.0.0 matplotlib==3.3.4 message-filters==1.15.9 mock==3.0.5 monotonic==1.6 netifaces==0.10.6 nftables==0.1 nose==1.3.7 notify2==0.3.1 ntplib==0.3.3 numpy==1.19.4 olefile==0.46 ordered-set==4.0.1 paramiko==2.7.2 pdfarranger==1.7.1 pexpect==4.8.0 pid==2.2.3 pikepdf==1.19.4 Pillow==7.2.0 ply==3.11 productmd==1.32 progressbar2==3.51.4 psutil==5.7.2 ptyprocess==0.6.0 pwquality==1.4.4 pyasn1==0.4.8 pycairo==1.18.2 pycparser==2.20 pycryptodomex==3.10.1 pycups==2.0.1 pycurl==7.43.0.5 pydbus==0.6.0 pydot==1.4.1 pyenchant==3.1.1 pygdbmi==0.10.0.0 Pygments==2.9.0 PyGObject==3.38.0 pygraphviz==1.5 pyinotify==0.9.6 pykickstart==3.29 PyNaCl==1.3.0 PyOpenGL==3.1.5 PyOpenGL-accelerate==3.1.5 pyparsing==2.4.7 pyparted==3.11.5 PyQt5==5.15.0 PyQt5-sip==4.19.24 pyserial==3.4 PySide2==5.15.2 PySocks==1.7.1 python-augeas==0.5.0 python-dateutil==2.8.1 python-engineio==3.14.2 python-gnupg==0.4.6 python-meh==0.50 python-qt-binding==0.4.3 python-socketio==4.6.1 python-utils==2.4.0 pytz==2020.5 pyudev==0.22.0 pyxdg==0.26 PyYAML==5.4.1 qt-dotgraph==0.4.2 qt-gui==0.4.2 qt-gui-cpp==0.4.2 qt-gui-py-common==0.4.2 requests==2.24.0 requests-download==0.1.2 requests-file==1.4.3 requests-ftp==0.3.1 resource-retriever==1.12.6 rosbag==1.15.9 rosboost-cfg==1.15.7 rosclean==1.15.7 roscreate==1.15.7 rosdep==0.20.1 rosdistro==0.8.3 rosgraph==1.15.9 roslaunch==1.15.9 roslib==1.15.7 roslint==0.12.0 roslz4==1.15.9 rosmake==1.15.7 rosmaster==1.15.9 rosmsg==1.15.9 rosnode==1.15.9 rosparam==1.15.9 rospkg==1.3.0 rospy==1.15.9 rosservice==1.15.9 rostest==1.15.9 rostopic==1.15.9 rosunit==1.15.7 roswtf==1.15.9 rpm==4.16.1.3 rqt-action==0.4.9 rqt-bag==0.5.0 rqt-bag-plugins==0.5.0 rqt-console==0.4.11 rqt-dep==0.4.10 rqt-graph==0.4.14 rqt-gui==0.5.2 rqt-gui-py==0.5.2 rqt-image-view==0.4.16 rqt-launch==0.4.9 rqt-logger-level==0.4.11 rqt-moveit==0.5.9 rqt-msg==0.4.9 rqt-nav-view==0.5.7 rqt-plot==0.4.12 rqt-pose-view==0.5.10 rqt-publisher==0.4.9 rqt-py-common==0.5.2 rqt-py-console==0.4.9 rqt-reconfigure==0.5.3 rqt-robot-dashboard==0.5.8 rqt-robot-monitor==0.5.13 rqt-robot-steering==0.5.12 rqt-runtime-monitor==0.5.8 rqt-rviz==0.6.1 rqt-service-caller==0.4.9 rqt-shell==0.4.10 rqt-srv==0.4.8 rqt-tf-tree==0.6.2 rqt-top==0.4.9 rqt-topic==0.4.12 rqt-web==0.4.9 rviz==1.14.4 scour==0.38.1 selinux==3.1 sensor-msgs==1.13.0 sepolicy==3.1 setools==4.3.0 setproctitle==1.1.10 setroubleshoot==1.1 shiboken2==5.15.2 simpleline==1.7 six==1.15.0 slip==0.6.4 slip.dbus==0.6.4 smach==2.5.0 smach-ros==2.5.0 smclib==1.8.6 sos==4.0 soupsieve==2.0.1 systemd-python==234 tf==1.13.2 tf-conversions==1.13.2 tf2-geometry-msgs==0.7.5 tf2-kdl==0.7.5 tf2-py==0.7.5 tf2-ros==0.7.5 tf2-sensor-msgs==0.7.5 topic-tools==1.15.9 urllib3==1.25.8 Werkzeug==0.16.1 xacro==1.14.5