Always getting "gdb session has been closed"
- Dominant language
- TypeScript
- Stars
- 10.4k
- Forks
- 521
- PR merge metrics
- No merged PRs in 30d
Description
* env1: starts program to debug
* env1 (in a different terminal): uses gdbserver to attach to the program and opens a port for env2
* env2 starts gdb and from its console uses `target extended-remote env1:port`
--> GDB lists the loaded modules (long list), then debugging works as expected
same scenario but with gdbgui:
* env1: starts program to debug
* env1 (in a different terminal): uses gdbserver to attach to the program and opens a port for env2
* env2 starts `python3 -m gdbgui -r -p otherport`, runs
* env3 starts firefox to http://env2:otherport/dashboard`,
* then uses the console `target extended-remote env1:port`
--> GDB within gdbgui lists the loaded modules (a lot of "" as that window is smaller) and when all modules are shown gdbgui says:
The connection to the gdb session has been closed. This tab will no longer function as expected.
To start a new session or connect to a different session, go to the dashboard.
which I can do to start a new session, do the same and end in the same place.
The terminal where gdbgui is running shows:
~~~
(2020-10-16 19:07:18,501) env2 - - [16/Oct/2020 19:07:18] "GET /dashboard_data HTTP/1.1" 200 -
(2020-10-16 19:07:18,502) [Errno 5] Input/output error
Traceback (most recent call last):
File "/tmp/gdbgui/py-site-packages/gdbgui/server/app.py", line 274, in check_and_forward_pty_output
response = debug_session.pty_for_gdb.read()
File "/tmp/gdbgui/py-site-packages/gdbgui/server/ptylib.py", line 77, in read
response = os.read(self.stdout, self.max_read_bytes).decode()
OSError: [Errno 5] Input/output error
~~~
gdbserver says:
~~~
readchar: Got EOF
Remote side has terminated connection. GDBserver will reopen the connection.
~~~
Any idea how to improve that process (env1 does not have gdbgui or python3 installed; env2 has this and is reachable via browser) or to debug that issue?
Contributor guide
Assessment
This issue has not been assessed yet.