How to change the working directory for assembly / debugging in Emacs?

I'm trying to get used to using Emacs for building and debugging, although I am having some difficulties. My biggest problem right now is that I need to be in (for example, open a file) the root directory for make -kmy applications, and I need to be in the binary directory to run gdb MyApp.

Is it hard to try to get Ctrl + Shift + B before make -k -C <my_hard_coded_dir>and some type with F5 running gdb <MyApp>from my bin directory? Never mind if the shift key is a big problem for Emacs.

+3
source share
3 answers

, M-x make , .

(setq compile-command "make -c /path/to/makefile")

GDB gud-gdb-command-name,

(setq gud-gdb-command-name "gdb --anotate=3 -cd /path/to/exec")
+6

spippet .emacs

(global-set-key [f2]   'compile)
(global-set-key [f3]   'next-error)
(setq compile-command "u: & cd \\gbceinspielen\\trunk\\src\\compile & make -k ")

"gdb" , , .

+2

EDE . , cedet, 100

0

Source: https://habr.com/ru/post/1709656/


All Articles