33 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
;;; .doomrc --- doom runtime config -*- mode: emacs-lisp; lexical-binding: t; -*-
 | 
						|
;;; Commentary:
 | 
						|
;;; Code:
 | 
						|
(require 'doom) ; be silent, byte-compiler
 | 
						|
 | 
						|
(after! dape
 | 
						|
        (add-to-list
 | 
						|
        'dape-configs
 | 
						|
        `(gdb-dap-openocd
 | 
						|
        ensure (lambda (config)
 | 
						|
                (dape-ensure-command config)
 | 
						|
                (let* ((default-directory
 | 
						|
                        (or (dape-config-get config 'command-cwd)
 | 
						|
                                default-directory))
 | 
						|
                        (command (dape-config-get config 'command))
 | 
						|
                        (output (shell-command-to-string (format "%s --version" command)))
 | 
						|
                        (version (save-match-data
 | 
						|
                                        (when (string-match "GNU gdb \\(?:(.*) \\)?\\([0-9.]+\\)" output)
 | 
						|
                                        (string-to-number (match-string 1 output))))))
 | 
						|
                        (unless (>= version 14.1)
 | 
						|
                        (user-error "Requires gdb version >= 14.1"))))
 | 
						|
        modes ()
 | 
						|
        command-cwd dape-command-cwd
 | 
						|
        command "gdb"
 | 
						|
        command-args ("--interpreter=dap")
 | 
						|
        :request nil
 | 
						|
        :program nil
 | 
						|
        :args []
 | 
						|
        :stopAtBeginningOfMainSubprogram nil))
 | 
						|
)
 | 
						|
 | 
						|
;;; .doomrc ends here
 |