[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs gdb program launcher
From: |
Nick Roberts |
Subject: |
emacs gdb program launcher |
Date: |
Thu, 19 Mar 2009 19:05:47 +1300 |
> I'm working on a program that has to be launched from a script which sets
> up the execution environment. Fortunately enough, the script provides an
> option to start it with GDB and it works ok.
>
> However, I would like to run this program with GDB from within emacs, as
> can usually be done. Thus, I start GDB with « M-x gdb » but replace the
> command with the program's launcher.
>
> And it works, but rather than opening the source code with emacs buffers,
> it merely prints lines to be executed in the *gud* buffer as it would do
> with GDB from command line.
You don't say what version of Emacs you are using. If it's 22.1, or later,
you can see in the minibuffer that gdb runs with the option "--annotate=3".
Your script probably interact with Emacs in the same way as gdb would
if you removed this option.
> I (guess I) undestand GDB is unaware it has been launched from within
> emacs but I don't see how to make it interact properly... I've messed a
> bit with gdb-show-main which was set no NIL but it doesn't seem to change
> anything. Could anyone give me a clue ?
Assuming your script doesn't filter the gdb output, you probably just need to
ensure that it runs gdb with the above option.
--
Nick http://www.inet.net.nz/~nickrob