Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
今、私はF5をemacsでgdbを開始するように設定しています:
(global-set-key [f5]'gdb)
これによりミニバッファに切り替わり、実行可能ファイルへのパスを入力します...このパスの入力をバイパスする方法を見つけたいです...
Makefileを調べ、それを解析して実行可能ファイルのフルパスを計算し、標準出力に出力する実行可能ファイルを作成しました...これを.emacsから呼び出すことは可能ですか...そして、どういうわけか出力をに渡しますgdbコマンド?
(defun gdb-getpath () "Figures out the path to executable and launches gdb." (interactive) (let ((path (shell-command-to-string "/path/to/your/executable"))) (gdb (concat "gdb " path)) )) (global-set-key [f5] 'gdb-getpath)