8000 bug: deleting a GDB session when gdbserver died causes endless loop · Issue #843 · emacs-lsp/dap-mode · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
bug: deleting a GDB session when gdbserver died causes endless loop #843
Open
@sfavazza

Description

@sfavazza

steps to reproduce

  • start a gdbserver on your machine
  • start a debug session with GDB connecting to gdbserver
  • once dap-mode kicks in from dap-hydra type r (restart the frame)
  • the restart fails (maybe gdbserver does not supports it? No idea, but not relevant for this issue)
  • the session appears as still active in the treemacs sessions pane
  • attempts to delete the sessions leads to an endless loop

cause of the issue

When deleting a session dap-delete-session will first check whether the target session is active. If it is the session must be first terminated.
This in turn triggers the a dap-request call to ask the DAP server to stop the session.

As the gdbserver has died there won't ever a reply, hence the dap-request call remains stuck to the loop checking for process output.

proposal to solve it

  • adding a dap-request timeout
  • adding a max number of attempts before giving up on the request
  • any other ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0