Skip to content

lldb-server deletes the debugged binary when doing remote debugging on local host #456

@ceres-c

Description

@ceres-c

I'm trying to use binja debugger with a debug server (the preferred way to do it, according to the docs here), but it deletes the file I'm trying to debug.

Test case:

  1. Open any binary in binary ninja (in this example, the standard ls binary from my distro)
  2. Start lldb-server in the same folder lldb-server p --server --listen 0.0.0.0:31337
  3. Connect to debug server (Debug -> Connect to debug server -> Platform: remote-linux | Host: 127.0.0.1 | Port: 31337)
  4. Connection succeeds
  5. Go to debugger menu on the left panel, start debugging

In the log I get LLDB Failed to launch target with "error: No such file or directory" and debug is not started. The file is now gone.
If I try to start debugging again, I get a different error message: LLDB Failed to create target with "'/home/federico/tmp_binja/ls' does not exist". Indeed the file does not exist anymore

Env:
Arch linux on x86-64
Binary ninja 3.3.3996
lldb-server 15.0.7

I tried to run with --debug, but I don't get any additional debug output in the terminal other than the aforementioned errors that I also had in the log panel in the GUI.
Let me know if I can help you with additional tests

Federico/ceres-c

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions