For each Emacs* session, before you can invoke the debugger, you must load the Intel® Debugger-specific Emacs LISP code, as follows:
M-x load-file
At the Load file: prompt, type the path to the Intel® Debugger-specific Emacs LISP file, which is located in the Intel IDB installation directory. For example:
/opt/intel_idb/bin/idb.el
You can also place a load-file call in your Emacs initialization file (~/.emacs ). For example:
(load-file "/opt/intel_idb/bin/idb.el")
To start the debugger with Emacs, type:
M-x idb
The following invocation line displays:
Run the Debugger (like this): idb
Edit the invocation line by typing the target program and pressing Return. Emacs remembers the invocation. To debug the same program again, you need only press Return.
Emacs displays the GUD buffer and runs the debugger within it; the debugger starts and displays its (idb) prompt, indicating readiness. The GUD buffer saves all of the commands you type and the program output for you to edit. In general, interact with the debugger in the GUD buffer as you would with a debugger started from a shell.
One of the benefits of running the debugger from within Emacs is a closer correlation between program execution and source. When your program stops (for example, at a breakpoint), Emacs displays the source of your program in a second buffer (source buffer) and indicates the current execution line with =>.
If the source is already loaded into a buffer, Emacs often finds that buffer. However, in some NFS mounting situations, Emacs may use an alternate name for some directories and will create a second buffer for your source (often with <2> appended to the name). Be careful that you do not modify the original buffer or kill it outright.