when using gdb I normally use it inside Emacs, which provides a nice environment for debugging while in text mode (image attached), but this doesn't seem to work with gdb-ia. When invoking gdb from inside Emacs, I change the name of the gdb executable to gdb-ia, but I get the error:
angelv@carro:~$ Error: you did not specify -i=mi on GDB's command line!
Is there any way to get gdb-ia to play nicely with GDB Emacs mode?
Ángel de Vicente
could you please tell me which exact versions you use for:
I had a quick go with EMACS 23.1.1 and gdb-ia 7.8-16.0.768 which worked w/o error message.
Thank you & best regards,
I am running the following versions:
emacs --version: GNU Emacs 24.5.1
gdb --version: GNU gdb (GDB) Fedora 7.9.1-20.fc22
gdb-ia --version: GNU gdb (GDB) 7.8-16.0.558
In the attached gdb-ia.png you see how I invoke gdb but using gdb-ia, and in gdb-ia2.png you see the error message. Any help appreciated.
Ángel de Vicente
Thank you very much for the information!
I'm now able to reproduce the problem. The root cause is that gdb-ia in MI mode (-i=mi) prints the first line w/o MI formatting:
No symbol table is loaded. Use the "file" command.
This makes EMACS thinking it's not in MI mode (hence the error: Error: you did not specify -i=mi on GDB's command line!).
I've filed a ticket for engineering (DPD200584470) to fix that in a future version. As a workaround you can use a wrapper script calling gdb-ia and filtering away the first line, e.g. (wrap.sh):
gdb-ia $@ 2>&1 | sed -e 's/^No symbol table is loaded. Use the "file" command.$/~""/g'
Use that instead of "gdb-ia" for the time being:
Run gdb (like this): ./wrap.sh -i=mi my_exec
we do not have any separate download for it. The only way to get those Intel enhanced GDBs is via the development suites. However, our teams are working with the community to up-stream as much as possible, and we also provide the GDB source code with the suites.
OK, thanks. By the way, in case it can be of interest to someone reading this thread in the future, I put up a video showing how to use gdb-ia + Emacs to debug both serial and parallel Fortran codes: https://youtu.be/Bc3H1fhh9ho
Any advice on how to improve my setting is very welcome.
Ángel de Vicente
DPD200584470 is now fixed with upcoming final release of Intel(R) Parallel Studio XE 2017 and the 2016 Update 4 version. Both will be released next month.
I know this is an old question but it seems gdb-ia is not working for me even though I have the latest release of intel fortran (gdb-ia -i=mi test.exe" and the message I got was: "Searching for program: No such file or directory, gdb-ia". Am I doing something wrong?
emacs --version: GNU Emacs 25.2.1
gdb --version: GNU gdb (GDB) 7.12.1
gdb-ia (GDB) 7.10-18.0.543
macOS -- Version 10.12.4
I haven't used this in a while, but it looks like Emacs simply cannot find gdb-ia. Before you invoke Emacs (or from an Emacs shell), can you find gdb-ia with the command which?
In my case:
[angelv@duna ~]$ which gdb-ia /opt/intel/2016.0.1/compilers_and_libraries_2016.1.150/linux/bin/intel64/gdb-ia
Thanks for your reply. If I write which gdb-ia in the terminal, I get nothing. However, if I write before: source /opt/intel/bin/compilervars.sh intel64 then I get: /opt/intel//debugger_2017/gdb/intel64/bin/gdb-ia. Do you have any idea about how to proceed?
All my best,
Just another quick question related with this old post. When I am debugging with gdb-ia in emacs, I get a lot of the following warnings:
warning: can't find symbol 'xxxxxxx' in minsymtab
Do you have any idea about how to get rid of these warnings. Thanks, Diego