Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] 'Failed to execute MI command: -exec-run' error when trying to debug a GNU project with Eclipse

The .gdbinit in the src/ directory is written to be used outside of
Eclipse CDT. So either disable or edit it as I mentioned in the
previous email. I don't know how to edit it to Eclipse's needs
exactly, but I would start by just disabling it. Most of the .gdbinit
is helper functions to make it easier to inspect emacs internals.
~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com


On 11 August 2017 at 12:49, Evan Aad <oddeveneven@xxxxxxxxx> wrote:
> OK, maybe this can help. I managed to debug Emacs from the command line very
> easily. Maybe you can help me set up Eclipse correspondingly.
>
> I opend Terminal, changed directory to ~/emacs/src, and executed the
> following:
>
>> gdb emacs-26.0.50.2
>
> This is all!
>
> On Fri, Aug 11, 2017 at 2:48 PM, Itai Berli <itai.berli@xxxxxxxxx> wrote:
>>
>> OK, maybe this can help. I managed to debug Emacs from the command line
>> very easily. Maybe you can help me set up Eclipse correspondingly.
>>
>> I opend Terminal, changed directory to ~/emacs/src, and executed the
>> following:
>>
>> > gdb emacs-26.0.50.2
>>
>> This is all!
>>
>> On Fri, Aug 11, 2017 at 2:20 PM, Jonah Graham <jonah@xxxxxxxxxxxxxxxx>
>> wrote:
>>>
>>> What is going on here is your project has a .gdbinit file that is not
>>> compatible with Eclipse CDT. You can edit .gdbinit file to make it
>>> work, or you can disable the use of the .gdbinit in the Debug
>>> Configuration -> Debugger Tab -> Set GDB command file to your own
>>> filename (or a blank). See the attached screenshot for where in the UI
>>> I am referring to.
>>>
>>> The emacs .gdbinit has a lot of useful stuff in it so you will
>>> probably want it :-) If you disable it about, you can type "source
>>> .gdbinit" after CDT has started the debug session in the Debugger
>>> Console.
>>>
>>> ~~~
>>> Jonah Graham
>>> Kichwa Coders Ltd.
>>> www.kichwacoders.com
>>>
>>>
>>> On 11 August 2017 at 12:11, Evan Aad <oddeveneven@xxxxxxxxx> wrote:
>>> > I've now managed to debug the Emacs source code with gdb using Emacs
>>> > itself
>>> > as the IDE. However, I prefer to use Eclipse, and would appreciate help
>>> > to
>>> > get it done.
>>> >
>>> > Additionally, I've managed to solve the error message I reported about
>>> > above, however now I'm getting another one:
>>> >
>>> > ---
>>> >
>>> > 'Launching emacs-26.0.50.1' has encountered a problem.
>>> >
>>> > Error in final launch sequence
>>> >
>>> > Failed to execute MI command:
>>> > source /Users/evanaad/emacs/src/.gdbinit
>>> > Error message from debugger back end:
>>> > /Users/evanaad/emacs/src/.gdbinit:19: Error in sourced command
>>> > file:\nNo
>>> > symbol table is loaded.  Use the "file" command.
>>> > /Users/evanaad/emacs/src/.gdbinit:19: Error in sourced command
>>> > file:\nNo
>>> > symbol table is loaded.  Use the "file" command.
>>> >
>>> > ---
>>> >
>>> > I initially got a similar message with Emacs as the IDE. The way I was
>>> > able
>>> > to resolve it there was to set gdb's current directory using
>>> >
>>> > (gdb) cd ~/evanaad/emacs/src
>>> >
>>> > And also to set gdb's executable file to 'bootstrap-emacs' thus:
>>> >
>>> > (gdb) file bootstrap-emacs
>>> >
>>> > On Fri, Aug 11, 2017 at 12:50 PM, Evan Aad <oddeveneven@xxxxxxxxx>
>>> > wrote:
>>> >>
>>> >> No, I can't debug even a simple Hello World application. How
>>> >> aggravating!
>>> >> Thanks for answering.
>>> >>
>>> >>
>>> >> On Fri, Aug 11, 2017 at 12:24 PM, Jonah Graham
>>> >> <jonah@xxxxxxxxxxxxxxxx>
>>> >> wrote:
>>> >>>
>>> >>> Hi,
>>> >>>
>>> >>> Does debugging a simple Hello World application work for you?
>>> >>>
>>> >>> If not, I suspect it is because GDB 7.12 does not work on MacOS
>>> >>> Sierra. I don't have access to such a machine, but have a look at
>>> >>> https://stackoverflow.com/a/40123809/2796832 as a starting point
>>> >>> perhaps?
>>> >>>
>>> >>> Jonah
>>> >>>
>>> >>> ~~~
>>> >>> Jonah Graham
>>> >>> Kichwa Coders Ltd.
>>> >>> www.kichwacoders.com
>>> >>>
>>> >>>
>>> >>> On 11 August 2017 at 10:11, Evan Aad <oddeveneven@xxxxxxxxx> wrote:
>>> >>> > I wish to debug GNU Emacs in Eclipse IDE for C/C++ on my macOS
>>> >>> > Sierra.
>>> >>> > I
>>> >>> > have downloaded the source code with Git and built the project
>>> >>> > successfully
>>> >>> > via the command line. I then imported the project to Eclipse as an
>>> >>> > existing
>>> >>> > Makefile project with the 'GNU autotools toolchain' setting.
>>> >>> >
>>> >>> > I can now run the Emacs GUI from Eclipse. However, when I try to
>>> >>> > debug
>>> >>> > it
>>> >>> > (with gdb), I get the following error message:
>>> >>> >
>>> >>> > ---
>>> >>> >
>>> >>> > 'Launching emacs-26.0.50.1' has encountered a problem.
>>> >>> > Error in final launch sequence
>>> >>> >
>>> >>> > Failed to execute MI command:
>>> >>> > -exec-run
>>> >>> > Error message from debugger back end:
>>> >>> > During startup program terminated with signal ?, Unknown signal.
>>> >>> > During startup program terminated with signal ?, Unknown signal.
>>> >>> >
>>> >>> > ---
>>> >>> >
>>> >>> >
>>> >>> > _______________________________________________
>>> >>> > cdt-dev mailing list
>>> >>> > cdt-dev@xxxxxxxxxxx
>>> >>> > To change your delivery options, retrieve your password, or
>>> >>> > unsubscribe
>>> >>> > from
>>> >>> > this list, visit
>>> >>> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>> >>> _______________________________________________
>>> >>> cdt-dev mailing list
>>> >>> cdt-dev@xxxxxxxxxxx
>>> >>> To change your delivery options, retrieve your password, or
>>> >>> unsubscribe
>>> >>> from this list, visit
>>> >>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>> >>
>>> >>
>>> >>
>>> >> _______________________________________________
>>> >> cdt-dev mailing list
>>> >> cdt-dev@xxxxxxxxxxx
>>> >> To change your delivery options, retrieve your password, or
>>> >> unsubscribe
>>> >> from this list, visit
>>> >> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > cdt-dev mailing list
>>> > cdt-dev@xxxxxxxxxxx
>>> > To change your delivery options, retrieve your password, or unsubscribe
>>> > from
>>> > this list, visit
>>> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>>
>>> _______________________________________________
>>> cdt-dev mailing list
>>> cdt-dev@xxxxxxxxxxx
>>> To change your delivery options, retrieve your password, or unsubscribe
>>> from this list, visit
>>> https://dev.eclipse.org/mailman/listinfo/cdt-dev
>>
>>
>
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top