Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get dap-debug to work for LLDB on an Apple M3 #800

Open
Denommus opened this issue Jul 22, 2024 · 1 comment
Open

Can't get dap-debug to work for LLDB on an Apple M3 #800

Denommus opened this issue Jul 22, 2024 · 1 comment

Comments

@Denommus
Copy link

This is my configuration:

(use-package dap-mode
  :config
  (require 'dap-lldb)
  (require 'dap-gdb-lldb)

  (dap-gdb-lldb-setup)

  (dap-register-debug-template
    "Mac lldb-vscode"
    (list :type "lldb-vscode"
      :request "launch"
      :name "lldb-vscode::run"
      :externalConsole "true"))

  (dap-register-debug-template "Rust::LLDB Run Configuration"
    (list :type "lldb-vscode"
      :request "launch"
      :name "LLDB::Run"
      :lldbpath "rust-lldb"
      :target nil
      :cwd nil))

  (with-eval-after-load 'dap-mode
    (setq dap-lldb-debug-program '("/run/current-system/sw/bin/lldb-vscode"))
    (setq dap-default-terminal-kind "integrated") ;; Make sure that terminal programs open a term for I/O in an Emacs buffer
    (dap-auto-configure-mode +1))
  )

When I actually try to run dap-debug, I'm always getting:

⛔ Warning (emacs): Initialize request failed: Could not create a target for a program '/Users/yuri/projetos/hello/hello.cpp': '/Users/yuri/projetos/hello/hello.cpp' doesn't contain any 'host' platform architectures: arm64, armv7, armv7f, armv7k, armv7s, armv7m, armv7em, armv6m, armv6, armv5, armv4, arm, thumbv7, thumbv7k, thumbv7s, thumbv7f, thumbv7m, thumbv7em, thumbv6m, thumbv6, thumbv5, thumbv4t, thumb, x86_64, x86_64, arm64, arm64e, arm64, arm64e.

I'm not sure whether that's a bug in dap-mode, if I'm configuring anything wrong (though this configuration works on my colleague's x86 linux machine), or if I'm missing anything else. But I felt I should post it as an issue.

@tmcgilchrist
Copy link

I would look at the executable /Users/yuri/projetos/hello/hello.cpp and check the Warnings buffer.

I'm using an Apple M3 with this setup:

(use-package dap-mode
  :config
  (require 'dap-codelldb)                 ; load lldb adapter for OCaml native
  (require 'dap-ocaml)                      ; load earlybird bytecode adapter
  :custom
  (dap-print-io t)
  :bind (("C-c M-n" . dap-next)
         ("C-c M-s" . dap-step-in)
         ("C-c M-a" . dap-step-out)
         ("C-c M-w" . dap-continue)))
{
    "version": "0.2.0",
    "configurations": [        
        {
            "type": "lldb",
            "request": "launch",
            "name": "LLDB with Dune",
            "program": "./_build/default/fib.exe",
            "args": [],
            "stopOnEntry": true,
            "cwd": "${workspaceFolder}"
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants