diff --git a/.dir-locals.el b/.dir-locals.el index e06f501..5010807 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -7,18 +7,18 @@ (setq-local flycheck-clang-include-path includes) (setq-local flycheck-gcc-include-path includes) (dap-register-debug-template - "PSX Debug" - (list :name "PSX -- Engine debug" + "Sonic XA Debug" + (list :name "PSX -- Sonic XA debug" :type "gdbserver" :request "attach" :gdbpath "/usr/bin/gdb-multiarch" :target ":3333" :cwd root - ;;:executable (concat root "build/engine.elf") - ;;:args (concat "-x " root "tools/gdbinit.txt") - ;; :autorun (list "monitor reset shellhalt" - ;; "load build/engine.elf" - ;; "tbreak main") + :executable (concat root "build/sonic.elf") + :args (concat "-x " root ".gdbinit") + :autorun (list "monitor reset shellhalt" + "load build/sonic.elf" + "tbreak main") )) ;; (when neotreebuf ;; (with-current-buffer (first neotreebuf) diff --git a/.gdbinit b/.gdbinit index 185f231..7382c9a 100644 --- a/.gdbinit +++ b/.gdbinit @@ -1,5 +1,5 @@ target remote localhost:3333 monitor reset shellhalt -file ./build/engine.elf -load ./build/engine.elf +file ./build/sonic.elf +load ./build/sonic.elf tbreak main diff --git a/README.org b/README.org index 1077d61..d9d4aa1 100644 --- a/README.org +++ b/README.org @@ -101,6 +101,24 @@ even load the ELF file with proper debug symbols. Have fun. +** A note on gdb-multiarch and Arch Linux + +For some reason, =gdb-multiarch= right now cannot be installed from AUR. So +you'll probably have to generate the package from a PKGBUILD by cloning the repo +and building it: + +#+begin_src bash +git clone --depth=1 https://aur.archlinux.org/gdb-multiarch.git/ +cd gdb-multiarch +makepkg -si +#+end_src + +Notice that you MIGHT Have to tweak download links and the =pkgver= variable as +well! If you install the =gdb= package, take a look at the version of the +package =gdb-common= which is also installed with it. (If you have other +problems you can just pass =--skippgpcheck= to =makepkg=, but be wary of what +you're doing) + * Running on real hardware #+html: