Vector35 / Vector35/debugger

Crash when debugging a program headlessly on macOS after reboot

Open
#678 1 comment 0 reactions 1 assignee View on GitHub

@xusheng6 is already working on this.

Since Dec 23, 2024.

bug crash Impact: High LLDB Adapter
Dominant language
C++
Stars
331
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Steps to repro:

  1. reboot the system
  2. use a headless script (see below) to debug any program
  3. the "Developer Tools Access" dialog pops up
  4. Authenticate as instructed and proceed
  5. Observe the crash

Notes:

  1. This only affects headless scripts. In GUI mode, after the authentication, the debugger works normally
  2. The "Developer Tools Access" dialog only shows up once before the computer reboots. If anyone wants to debug this, please keep it in mind
import binaryninja
from binaryninja.debugger import DebuggerController

bv = binaryninja.load("/Users/xusheng/debugger_build/debugger/test/binaries/Darwin-arm64-signed/helloworld")
dc = DebuggerController(bv)
dc.adapter_type = 'LLDB'

# Launch the target
if dc.launch_and_wait():
    print("Launch successful.")
    # Resume execution and wait for the target to stop
    stop_reason = dc.go_and_wait()
    # After the target has stopped
    print(f"Stop Reason: {dc.stop_reason_str}")
else:
    print("Failed to launch the target.")

print("Done!")

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.