Quick background -- I cannot start the .exe from a debugger; I need to attach after the fact. Binary Ninja's debugging plugin only allows attaching to a remote debug server and not a process. The target application is also 32-bit if that matters.

I have installed MinGW and the gdb packages from it. Fired up gdbserver and attached the process.

When I attempt to connect through Binary Ninja I get a status of ERROR: acquiring xml and the following stack trace

Traceback (most recent call last):
  File "C:\Users\foo\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_debugger\dockwidgets\ControlsWidget.py", line 312, in perform_attach_thread
  File "C:\Users\foo\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_debugger\binjaplug.py", line 720, in attach
    raise e
  File "C:\Users\foo\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_debugger\binjaplug.py", line 715, in attach
    self.adapter.connect(self.remote_host, self.remote_port)
  File "C:\Users\foo\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_debugger\QueuedAdapter.py", line 118, in connect
    return self.submit(lambda: self.adapter.connect(server, port))
  File "C:\Users\foo\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_debugger\QueuedAdapter.py", line 84, in submit
    raise result
  File "C:\Users\foo\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_debugger\QueuedAdapter.py", line 48, in worker
    self.results[index] = (True, job())
  File "C:\Users\foo\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_debugger\QueuedAdapter.py", line 118, in <lambda>
    return self.submit(lambda: self.adapter.connect(server, port))
  File "C:\Users\foo\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_debugger\gdb.py", line 83, in connect
    self.connect_continued(sock, rspConn)
  File "C:\Users\foo\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_debugger\gdb.py", line 62, in connect_continued
  File "C:\Users\foo\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_debugger\gdblike.py", line 537, in reg_info_load
    xmltxt = self.rspConn.get_xml('target.xml')
  File "C:\Users\foo\AppData\Roaming\Binary Ninja\repositories\official\plugins\Vector35_debugger\rsp.py", line 185, in get_xml
    raise RspGeneralError('acquiring xml')
Vector35_debugger.rsp.RspGeneralError: acquiring xml

On the gdbserver side I am greeted with an error about an invalid hex digit:

D:\>gdbserver --attach 3476
Attached; pid = 3476
Listening on port 4444
Remote debugging from host
Reply contains invalid hex digit

I can't find any real information when it comes to using Binary Ninja for debugging on Windows. Is it possible at this time?

  • Have you tried the official support channels?
    – Igor Skochinsky
    Oct 13, 2021 at 19:37


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.