Documentation: https://gdbgui.com
Source Code: https://github.com/cs01/gdbgui/
Browser-based frontend to gdb (gnu debugger). Add breakpoints, view the stack, visualize data structures, and more in C, C++, Go, Rust, and Fortran. Run gdbgui from the terminal and a new tab will open in your browser.
Home Page: https://gdbgui.com
License: GNU General Public License v3.0
Documentation: https://gdbgui.com
Source Code: https://github.com/cs01/gdbgui/
This tool looks really good and I am itching to try it out. Wanted to find out if there was a way to install it on a linux server where I dont have admin rights, say for instance within my home directory. Thanks for your help!
Hello @cs01
Thanks cool debugger!
I get following error when I try to look vector's inside.
My environment is as below.
OS | Web browser |
---|---|
Ubuntu 16.04 | Firefox |
When I debug following program for now.
#include <iostream>
#include <vector>
using namespace std;
int main(void)
{
vector<char> str;
vector<double> pos(3);
vector<char> a(10,'a');
vector<double> d {1.1, 2.2, 3.3, 4.4};
vector<double> cop(d);
for(auto itr = begin(d); itr != end(d); ++itr)
{
cout << *itr << "\t";
*itr += 10;
}
cout << endl;
for(auto itr = begin(d); itr != end(d); ++itr)
{
cout << *itr << "\t";
}
cout << endl;
return 0;
}
Then I compiled and run following command to launch gdbgui
$ g++ -std=c++11 vector.cpp
$ gdbgui ./a.out
And tried to d vector's inside. But I got error.
Could you tell me what I make a mistake?
Thanks in advance.
with gdb, if I press control + c, I can stop the current process,
with gdbgui, there is no pause button.
there is an int button, which I thought was a pause button, but it doesn't seem to be the case.
On 10.12 (Sierra) or later with SIP, we need to run this:
echo "set startup-with-shell off" >> ~/.gdbinit
So, we on Mac Sierra we need to add an extra argument on the GdbController. Something like this:
gdb_args=['-nx', '--interpreter=mi2']
# checking the current operating system
if sys.platform == "darwin":
gdb_args.append('--init-eval-command=set startup-with-shell off')
#
_gdb[request.sid] = GdbController(gdb_path=GDB_PATH, gdb_args=gdb_args)
I'm submitting a patch file to you, If you like my work then we can apply it.
backend.patch.txt
I am working to make pygdbmi
(gdbgui's parsing engine) use something other than epoll()
, which is not implemented on OSX. See the related ticket in pygdbmi: cs01/pygdbmi#5
the command line outputs something like
gdb /oracle/rdbms/12101/bin/oracle
(gdb) disas opifch2
0x000000000b5b8f80 <+17136>: callq 0xb860510 <dbgdChkEventIntV>
while gdbgui outputs the following (missing function the function)
0x000000000b5b8f80 <+17136>: callq 0xb860510
I suppose highlightjs would be reasonably easy to integrate into this project and would be very beneficial to the user experience.
The following steps result in gdb hanging and not returning a response:
d
A simplified version of this occurs with the following mi commands:
-file-exec-and-symbols /home/csmith/git/gdbgui/examples/cpp.a
-break-insert main
-exec-run
-enable-pretty-printing
-var-create - * "d"
-var-list-children --all-values "var1"
Note that gdb does not hang with the following script (pretty printing not enabled):
-file-exec-and-symbols /home/csmith/git/gdbgui/examples/cpp.a
-break-insert main
-exec-run
-var-create - * "d"
-var-list-children --all-values "var1"
I'm trying to use this program, but I get the following error in the GUI:
Unable to find Mach task port for process-id 19311: (os/kern) failure (0x5).\n (please check gdb is codesigned - see taskgated(8))
I'm on OSX 10.11 and installed gdb through homebrew
I installed gdbgui but as soon as I try to run it, it opens up a window in the browser and then immediately crashes followed by a traceback that is printed saying that it "cannot import name 'POINTER'" (screenshot attached). Is there something I'm doing wrong? Any help would be appreciated, thank you
Exception stack:
[2017-04-23 13:11:45,058] ERROR in app: Exception on /read_file [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.5/dist-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.5/dist-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python3.5/dist-packages/gdbgui/backend.py", line 311, in read_file
highlight = json.loads(request.args.get('highlight', 'true'))
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
OS: Ubuntu 16.04.2 LTS
Kernel: Linux 4.8.0-46-generic #49~16.04.1-Ubuntu SMP Fri Mar 31 14:51:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
GDB Version Info:
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
This GDB was configured as "x86_64-linux-gnu".
Browser: Google Chrome Version 58.0.3029.81 (64-bit)
Reasons multiple breakpoints may be set with a single click:
http://stackoverflow.com/a/35245024/2893090
This issue was created to document the behavior, and will be fixed in a future version.
gdb version is used to determine which flags to pass to gdb in some circumstances
arm-none-eabi-gdb -v
GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160616-cvs
fyi @alexdu
It would be useful to be able to specify working directory and inject LD_LIBRARY_PATH / LD_PRELOAD to debug more complex frameworks.
Following the readme gave me errors:
Downloading enum34-1.1.6-py2-none-any.whl
Building wheels for collected packages: gdbgui, pygdbmi, pypugjs, Flask-SocketIO, itsdangerous, python-socketio, python-engineio, enum-compat, MarkupSafe
Running setup.py bdist_wheel for gdbgui ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zVrAdJ/gdbgui/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpXQSOKFpip-wheel- --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for gdbgui
Running setup.py clean for gdbgui
Running setup.py bdist_wheel for pygdbmi ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zVrAdJ/pygdbmi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpRMxYttpip-wheel- --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for pygdbmi
Running setup.py clean for pygdbmi
Running setup.py bdist_wheel for pypugjs ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zVrAdJ/pypugjs/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpYdmJzcpip-wheel- --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for pypugjs
Running setup.py clean for pypugjs
Running setup.py bdist_wheel for Flask-SocketIO ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zVrAdJ/Flask-SocketIO/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmplPzPrDpip-wheel- --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for Flask-SocketIO
Running setup.py clean for Flask-SocketIO
Running setup.py bdist_wheel for itsdangerous ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zVrAdJ/itsdangerous/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp3J4U1qpip-wheel- --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for itsdangerous
Running setup.py clean for itsdangerous
Running setup.py bdist_wheel for python-socketio ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zVrAdJ/python-socketio/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpvzkR0rpip-wheel- --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for python-socketio
Running setup.py clean for python-socketio
Running setup.py bdist_wheel for python-engineio ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zVrAdJ/python-engineio/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp03TuRspip-wheel- --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for python-engineio
Running setup.py clean for python-engineio
Running setup.py bdist_wheel for enum-compat ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zVrAdJ/enum-compat/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpyBkzDgpip-wheel- --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for enum-compat
Running setup.py clean for enum-compat
Running setup.py bdist_wheel for MarkupSafe ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zVrAdJ/MarkupSafe/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpP_Kq6wpip-wheel- --python-tag cp27:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
Failed building wheel for MarkupSafe
A pip install wheel
seems to have solved them. An unlisted dependency?
gdb mi supports remote debugging, i.e. -target-select
. Add a UI element to choose remote target.
I've thought a long time of building something like this for the Python debugger. I'd love to contribute support for that to this raher than building yet another project that does half of what this one does.
Would you be open to a contribution like this?
I see myself using the arg by default alot on remote systems. Mabye -n?
Method highlight_paused_line_and_scrollto_line
is frequently called. Sometimes it's unnecessary, and annoying.
when using gdb, pressing up will show previous commands.
gdbgui doesn't keep a history of previous commands.
This is issue #413 on Flask-SocketIO. When using gevent
as the async mode for SocketIO and with debug
set to True
, it monkey patches the select
module and removes, among other things, select.epoll
and select.epoll.poll
. This results in an unusable app. Again this only applies to gdbgui when the --debug
flag is passed.
This issue was created to document the behavior, and will be fixed in a future version. Current workaround if you are developing and running in debug mode is to change async_mode='gevent'
to async_mode='eventlet'
(and to pip install eventlet
).
Can you help with exact steps for disassembling binaries using gdb-gui?
you could show the contents (-tree) of a variable in a popover when hovering a variable name in the source window just the same as in the expression window
` Running setup.py install for greenlet ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-WSfAmC/greenlet/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-6W38jX-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'greenlet' extension
creating build
creating build/temp.macosx-10.12-intel-2.7
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c greenlet.c -o build/temp.macosx-10.12-intel-2.7/greenlet.o
creating build/lib.macosx-10.12-intel-2.7
cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. build/temp.macosx-10.12-intel-2.7/greenlet.o -o build/lib.macosx-10.12-intel-2.7/greenlet.so
running install_lib
copying build/lib.macosx-10.12-intel-2.7/greenlet.so -> /Library/Python/2.7/site-packages
running install_headers
creating /System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/greenlet
error: could not create '/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/greenlet': Operation not permitted
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-WSfAmC/greenlet/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-6W38jX-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-WSfAmC/greenlet/`
I am getting the error:
ReferenceError: invalid assignment left-hand side
when trying gdbgui in Firefox (Seems to work in Chromium) on Fedora.
The error happens at gdbgui.js:2492:8
The code in question looks like:
set_threads: function(threads){
State.get('threads') = $.extend(true, [], threads)
Threads.render()
},
where the assignment happens.
I tried on Firefox stable and nightly.
I feel silly for asking, but is there a way to stop an already running program?
In cmdline gdb, I just do ctrl-c and the program stops wherever it is.
I don't see a similar function in gdbgui.
Hi!
First of all, awesome that you made this! I think this could be a great asset when teaching debugging skills of any kind!
Now, for the problem I have:
I'm on windows 7 with pip 9.0.1
Python version is 2.7
And I get this error:
#pip install gdbgui --upgrade
Collecting gdbgui
Using cached gdbgui-0.7.4.0.tar.gz
Collecting Flask>=0.12 (from gdbgui)
Using cached Flask-0.12-py2.py3-none-any.whl
Collecting pygdbmi>=0.7.2.1 (from gdbgui)
Using cached pygdbmi-0.7.3.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\evvr\appdata\local\temp\pip-build-c2ejm6\pygdbmi\setup.py", line 4, in <module>
from pygdbmi.tests import test_app
File "c:\users\evvr\appdata\local\temp\pip-build-c2ejm6\pygdbmi\pygdbmi\tests\test_app.py", line 13, in <module>
from pygdbmi.gdbcontroller import GdbController
File "c:\users\evvr\appdata\local\temp\pip-build-c2ejm6\pygdbmi\pygdbmi\gdbcontroller.py", line 3, in <module>
import fcntl
ImportError: No module named fcntl
Any idea why fcntl
is failing on me? Is it because this module is only for Unix systems?
The GUI displays ""failed to fetch file at path (some_file).cpp"", where the path exists (I can do ls -l some_file.cpp and get the output).
Full console log:
[2017-03-27 12:39:55,389] ERROR in app: Exception on /read_file [GET]
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/lib/python2.7/site-packages/gdbgui/backend.py", line 312, in read_file
highlight = json.loads(request.args.get('highlight'))
File "/usr/lib64/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib64/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib64/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Hi,
I love this project very much but got a trouble on entering input to my program.
The current gdb command console on the web is working for entering a string to my program but it's not in real-time. Often, I see nothing printed but it's actually waiting for my input. After an input, it would print the messages again. In addition, gdbgui does not support bash color coding, which I think is unnecessary.
Is there any way to redirect/pipe all stdin/stderr/stdout file descriptor to my own terminal so that I can interact with my program on a console instead of the web interface?? Or.... we can enhance gdbgui to simply provide another option which leaves the interaction to the user on the terminal it's been executed instead of taking them away from the console. Maybe using remote gdb can provide this function easily?
by default gdbgui should show disassembly if file cannot be fetched (see #60)
When I run gdbgui from within a vagrant machine (running Arch), I can access the web UI just fine. I don't get any errors presented and I can tell that it finds the binary, since it doesn't show the "no file specified" error. When I click the "start inferior program from the beginning" button, the status label beneath it is updated to "stopped, exited." However, I cannot fetch any disassembly, set breakpoints, inspect memory, or anything useful. Checking the "automatically break on main" hasn't helped either, as the program just exits.
I'm running the gdb server like so:
# From within the vagrant machine
$ gdbgui -r
When I run the gdbgui from within my host Arch machine, not the guest Arch vagrant machine, I can load the same binary and fetch the disassembly. Both are using the same versions of all packages.
$ pip freeze
appdirs==1.4.3
click==6.7
enum-compat==0.0.2
eventlet==0.21.0
Flask==0.12.2
Flask-SocketIO==2.9.0
gdbgui==0.7.8.2
gevent==1.2.2
greenlet==0.4.12
itsdangerous==0.24
Jinja2==2.9.6
MarkupSafe==1.0
packaging==16.8
pygdbmi==0.7.4.0
Pygments==2.2.0
pyparsing==2.2.0
pypugjs==4.2.2
python-engineio==1.6.1
python-socketio==1.7.5
six==1.10.0
Werkzeug==0.12.2
$ gdbgui -v
0.7.8.2
$ gdb --version
GNU gdb (GDB) 7.12.1
...
The current workaround is to use gdb 7.11.1.
The error was first encountered by @sharazam in #52.
The message shown on the frontend is
error Error occured on server when running gdb command: [Errno 32] Broken pipe
It's probably better designed (though not as battle-tested).
See https://github.com/o11c/ungdb/blob/master/gdbmi/__init__.py
Simply running gdbgui and waiting:
$ gdbgui './mycmd --arg1 --arg2'
Opening gdbgui in browser (http://127.0.0.1:5000)
** view app at http://127.0.0.1:5000 **
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/pywsgi.py", line 935, in handle_one_response
self.run_application()
File "/usr/local/lib/python2.7/dist-packages/gevent/pywsgi.py", line 908, in run_application
self.result = self.application(self.environ, self.start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1997, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask_socketio/__init__.py", line 42, in __call__
start_response)
File "/usr/local/lib/python2.7/dist-packages/engineio/middleware.py", line 47, in __call__
return self.engineio_app.handle_request(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 353, in handle_request
return self.eio.handle_request(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/engineio/server.py", line 268, in handle_request
self.disconnect(sid)
File "/usr/local/lib/python2.7/dist-packages/engineio/server.py", line 202, in disconnect
self._get_socket(sid).close()
File "/usr/local/lib/python2.7/dist-packages/engineio/server.py", line 411, in _get_socket
raise KeyError('Session is disconnected')
KeyError: 'Session is disconnected'
Thu Jun 15 11:51:06 2017 {'REMOTE_PORT': '50580', 'HTTP_HOST': '127.0.0.1:5000', 'REMOTE_ADDR': '127.0.0.1', (hidden keys: 23)} failed with KeyError
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/pywsgi.py", line 935, in handle_one_response
self.run_application()
File "/usr/local/lib/python2.7/dist-packages/gevent/pywsgi.py", line 908, in run_application
self.result = self.application(self.environ, self.start_response)
File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1997, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask_socketio/__init__.py", line 42, in __call__
start_response)
File "/usr/local/lib/python2.7/dist-packages/engineio/middleware.py", line 47, in __call__
return self.engineio_app.handle_request(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 353, in handle_request
return self.eio.handle_request(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/engineio/server.py", line 268, in handle_request
self.disconnect(sid)
File "/usr/local/lib/python2.7/dist-packages/engineio/server.py", line 202, in disconnect
self._get_socket(sid).close()
File "/usr/local/lib/python2.7/dist-packages/engineio/server.py", line 411, in _get_socket
raise KeyError('Session is disconnected')
KeyError: 'Session is disconnected'
Thu Jun 15 11:51:06 2017 {'REMOTE_PORT': '50584', 'HTTP_HOST': '127.0.0.1:5000', 'REMOTE_ADDR': '127.0.0.1', (hidden keys: 23)} failed with KeyError
That apparently happens when I switch from Firefox to Chrome, due to #75.
More of a request than an actual issue, but I have a use case where I have a Go binary compiled using gccgo, and use the command line GDB to debug it. I cannot use your tool to debug it due to the non-commercial aspect of the license.
Will you consider modifying the license to one that will allow the use of this tool in commercial settings?
- This pattern provides for a reactive environment, similar to ReactJS
- but with no build system/JSX, but at the cost of less efficiency. I prefer a Vanilla Javascript
- to the complexity ReactJS introduces. ReactJS may be considered if performance becomes an issue
- since it can render more efficently.
This is the comment I found in the gdbgui.js.
Disclaimer: I haven't run this project locally, but the screencast is flickering and I am surprised that you have chosen to reimplement React with jQuery.
What kind of complexity does React introduce in your opinion? Have you considered UMD builds (these are just good old "classic" way of packaging a module into a single .js file with globally exposed interfaces) of ReactJS? You may also like Preact and Inferno projects (they are extremely lightweight ReactJS implementations).
┌─(✓)[jeaye@oryx]─[~][23:42:27]
└──╼ gdbgui -p 5001 -r
Traceback (most recent call last):
File "/sbin/gdbgui", line 11, in <module>
load_entry_point('gdbgui==0.7.6.2', 'console_scripts', 'gdbgui')()
File "/usr/lib/python3.6/site-packages/gdbgui/backend.py", line 385, in main
setup_backend(serve=True, host=args.host, port=int(args.port), debug=bool(args.debug), open_browser=(not args.no_browser), LLDB=(args.lldb or 'lldb-mi' in args.gdb.lower()))
File "/usr/lib/python3.6/site-packages/gdbgui/backend.py", line 106, in setup_backend
print('\n\n** view app at http://%s:%d **\n\n' % (socket.gethostbyname(socket.gethostname()), port))
socket.gaierror: [Errno -2] Name or service not known
I was originally trying this in a vagrant machine, which has port 5000 forwarded to my host. When it failed, I tried it on the host, where I can also reproduce the issue. I'd think that binding to 0.0.0.0
shouldn't cause any problems, but I may be missing something.
Tested on Arch Linux.
┌─(✗)[jeaye@oryx]─[~][23:42:31]
└──╼ python --version
Python 3.6.1
┌─(✓)[jeaye@oryx]─[~][23:44:52]
└──╼ pip --version
pip 9.0.1 from /usr/lib/python3.6/site-packages (python 3.6)
I mostly use lldb on mac and gdb on linux. Could this be made to work with lldb as well?
The mapping in commands from gdb to lldb is 1:1, the commands are often just named slightly differently. I'd like to use something that gives me a smooth experience with both.
When using a command that changes the current instruction, for example "next", the current line in the UI should change.
This should be the same as pressing the relevant button in the GUI.
Simple suggestion: after each gdb command that is executed get the current line in GDB and if needed update the UI.
gdbgui may slow and exit if the binary file has a large number of source files. Output from the command -file-list-exec-source-files
is very verbose, and parser-intensive. It might be a good idea to not run that command if the binary to debug is very large, or just just add a button that refreshes the source file list. The line in question is: https://github.com/cs01/gdbgui/blob/master/gdbgui/static/js/gdbgui.js#L1638
.. especially for debug stepping would be so great :3
And there is another error: 1490015500998 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https."
Console is visible in Chrome but not in Firefox 54.
There are some circumstances where the client (user) receives misleading/scary looking messages that are innocuous. For example, when hovering over a variable that does not yet exist red error text is displayed in the console, but shouldn't be.
Add a way to ignore gdb error responses for arbitrary gdb commands.
When I call gdbgui in terminal, error is throwing and nothing more happenes.
Ubuntu 14.04
$ gdbgui
Traceback (most recent call last):
File "/usr/local/bin/gdbgui", line 5, in
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in
working_set = WorkingSet._build_master()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 444, in _build_master
ws.require(requires)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 725, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 628, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: click>=2.0
running win7 with cygwin64 installed and python 2.7 as an environment in anaconda.
I am lost as to how to view the source code in the browser and debug it. I went through the screenshots and gif. A small guide of sorts from loading a .cpp file to debugging it would be really helpful.
An STL container expression, e.g. list1
, {1}, with size 1,
after it's updated to {2,3}, with size 2,
the expressions bar only displays the updated 1st element,
but leaves out the 2nd new element.
When running gdb v 7.6 up to current HEAD, ee7e95efb9 with the mi2 interpreter, and trying to view disassembly in mode 4 (mixed source and disassembly), the line number argument is being ignored. This seems like a bug in gdb that gdbgui cannot do anything about.
for example
-file-exec-and-symbols /home/csmith/git/pygdbmi/pygdbmi/tests/sample_c_app/a.out
-data-disassemble -f /home/csmith/git/pygdbmi/pygdbmi/tests/sample_c_app/hello.c -l 16 -n 1 4\n
^done,asm_insns=[src_and_asm_line={line="16",file="hello.c",fullname="/home/csmith/git/pygdbmi/pygdbmi/tests/sample_c_app/hello.c",line_asm_insn=[{address="0x000000000040057d",func-name="main",offset="0",inst="push %rbp"}]}]
but when I try to look at the next line (17), it outputs the same line (16):
-data-disassemble -f /home/csmith/git/pygdbmi/pygdbmi/tests/sample_c_app/hello.c -l 17 -n 1 4
^done,asm_insns=[src_and_asm_line={line="16",file="hello.c",fullname="/home/csmith/git/pygdbmi/pygdbmi/tests/sample_c_app/hello.c",line_asm_insn=[{address="0x000000000040057d",func-name="main",offset="0",inst="push %rbp"}]}]
tagging @o11c
edit: filed gdb bug: https://sourceware.org/bugzilla/show_bug.cgi?id=21451
my program dynamically loads a shared library libhahaha.so
If I set a break point before it is loaded, I see the following
Make breakpoint pending on future shared library load? (y or [n]) [answered N; input not from terminal
and then if I press y, gdbgui would complain that "y" is not a valid command.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.