Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Failure to execute MI command during Debug - Helios
Failure to execute MI command during Debug - Helios [message #1723712] Wed, 17 February 2016 10:41 Go to next message
Vishesh Garg is currently offline Vishesh GargFriend
Messages: 3
Registered: February 2016
Junior Member
When try to launch a debug session by attaching to a remote process, I get the following error:

Error in final launch sequence
Failed to execute MI command:
-target-attach 28175
Error message from debugger back end:
Cannot access memory at address 0x5f31534b52455361
Cannot access memory at address 0x5f31534b52455361


I saw a similar issue being reported in the thread https://www.eclipse.org/forums/index.php/t/795327/. It was mentioned in the response to disable "Set breakpoint at" to avoid setting up of breakpoint at main. However, I find no such option in the Helios version of Eclipse.

Are there any other ways to get around this problem?

-Vishesh
Re: Failure to execute MI command during Debug - Helios [message #1723779 is a reply to message #1723712] Wed, 17 February 2016 21:09 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
It's on the debugger tab in the debug configuration.
http://help.eclipse.org/mars/topic/org.eclipse.cdt.debug.application.doc/tasks/cdt_t_run_dbg.htm
This one is for Cygwin but others will have similar wording.
Uncheck stop at main.

Re: Failure to execute MI command during Debug - Helios [message #1723792 is a reply to message #1723779] Thu, 18 February 2016 03:44 Go to previous messageGo to next message
Vishesh Garg is currently offline Vishesh GargFriend
Messages: 3
Registered: February 2016
Junior Member
Attached is the screenshot of how the Debugger tab looks for Eclipse Helios in Ubuntu - where the stop at main option is missing. I tried the Non-stop mode option available there (in case that corresponds to it) but it didn't resolve the issue.

-Vishesh
Re: Failure to execute MI command during Debug - Helios [message #1723812 is a reply to message #1723792] Thu, 18 February 2016 08:29 Go to previous messageGo to next message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 416
Registered: June 2014
Senior Member
Hello Vishesh,

Sorry you are having trouble with CDT. Hopefully someone here can help.

I didn't answer yesterday because I have no (easy) access to Helios to try stuff out. I had assumed you must be using a vendor provided Eclipse that had not been updated for a long time, but now I see you are using a very old Eclipse with a (relatively?) new Ubuntu and therefore relatively new GDB.

Helios is about 6 years old, around when GDB 7.0 came out.

Eclipse Mars officially supports GDB 7.1+ and unofficially GDB 6.6+. Please update to Eclipse Mars.

If you cannot update, please let me know and I can consider if I can help further. It would help in this case to explain what aspect prevents you from updating. Please also provide the version of GDB you are using.

Thanks
Jonah
Re: Failure to execute MI command during Debug - Helios [message #1723824 is a reply to message #1723812] Thu, 18 February 2016 09:35 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
It's been a long time since I've used Helios (even my older systems have Juno) but my recollection is the option is there somewhere, perhaps on a different tab. I don't recall having to attach to a running task though.

Stopping at main might not be what is going on. It may be an entirely different issue. There is a console window for GDB (two actually) selectable through a drop down menu in the Console View. It may give some indication what GDB (or Eclipse through GDB) is trying to do.

Check the .gdbinit file. There may be something in it that is triggering it. If there is, trying to attach while running GDB by itself would also have the same problem. Have you tried running GDB by itself and try to attach?

Yes, do upgrade if you can.If you can't, try to keep the tools originally used by Helios intact or you may find yourself facing compatibility problems.

EDIT:
Still can't type.

[Updated on: Thu, 18 February 2016 09:40]

Report message to a moderator

Re: Failure to execute MI command during Debug - Helios [message #1723826 is a reply to message #1723824] Thu, 18 February 2016 09:52 Go to previous messageGo to next message
Vishesh Garg is currently offline Vishesh GargFriend
Messages: 3
Registered: February 2016
Junior Member
Thanks Jonah and David. Sure, I'll update to the latest version and repost in case the issue persists.
Re: Failure to execute MI command during Debug - Helios [message #1723829 is a reply to message #1723824] Thu, 18 February 2016 09:55 Go to previous messageGo to next message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 416
Registered: June 2014
Senior Member
Just to clarify, there is no Stop on main option when you are doing attach, either in Helios or in Mars. When doing an attach, the debugger stops the program where it is.
Re: Failure to execute MI command during Debug - Helios [message #1723834 is a reply to message #1723829] Thu, 18 February 2016 10:53 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Actually the link given by the OP (https://www.eclipse.org/forums/index.php/t/795327/) does say there is one. The post is dated in July, 2014 and the Eclipse version being discussed was Kepler. No one complained about it being incorrect and someone even thanked the responder.

I have just noticed though it makes a reference to a Startup subtab. There isn't one normally that I know of. It might be something peculiar to ARM or perhaps even OSX.
Re: Failure to execute MI command during Debug - Helios [message #1723845 is a reply to message #1723834] Thu, 18 February 2016 12:51 Go to previous messageGo to next message
Jonah Graham is currently offline Jonah GrahamFriend
Messages: 416
Registered: June 2014
Senior Member
Quote:
Actually the link given by the OP (https://www.eclipse.org/forums/index.php/t/795327/) does say there is one.


That link is referring to remote connection (i.e. C/C++ Remote Application), different flow than attach (i.e. C/C++ Attach to Application).

An example of remote is when connecting to gdbserver (or something else implementing RSP, such as Segger)

Re: Failure to execute MI command during Debug - Helios [message #1723869 is a reply to message #1723845] Thu, 18 February 2016 15:42 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
Jonah Graham wrote on Thu, 18 February 2016 12:51
Quote:
Actually the link given by the OP (https://www.eclipse.org/forums/index.php/t/795327/) does say there is one.


That link is referring to remote connection (i.e. C/C++ Remote Application), different flow than attach (i.e. C/C++ Attach to Application).

An example of remote is when connecting to gdbserver (or something else implementing RSP, such as Segger)



Right. When doing a "C/C++ Application" or "C/C++ Remote Application" type of launch, CDT will actually start the process for you and therefore, the user can specify if CDT should stop the process at "main" (or whatever other method you choose).

For "C/C++ Attach to Application" CDT is being asked to attach to a running process. In that case, it does not make sense to have an option to "stop on startup" since the process is already running.

Now, the error

-target-attach 28175
Error message from debugger back end:
Cannot access memory at address 0x5f31534b52455361

is caused by GDB. I'm not sure what it is trying to do exactly, but it seems that it cannot attach to the process for some reason.

If this happens again with a newer version of Eclipse, I would recommend trying manually with GDB to see if your target even allows to attach to a process.

Marc
Re: Failure to execute MI command during Debug - Helios [message #1789929 is a reply to message #1723869] Thu, 31 May 2018 21:43 Go to previous messageGo to next message
Gregg Wonderly is currently offline Gregg WonderlyFriend
Messages: 3
Registered: May 2018
Junior Member
In oxygen, if there is text in the function to stop at box, even though the checkbox is unchecked, it still fails.
Re: Failure to execute MI command during Debug - Helios [message #1789930 is a reply to message #1723869] Thu, 31 May 2018 21:49 Go to previous messageGo to next message
Gregg Wonderly is currently offline Gregg WonderlyFriend
Messages: 3
Registered: May 2018
Junior Member
On Oxygen, I had to clear the text "main" from the function name box as well as uncheck the checkbox to get it to stop trying.
Re: Failure to execute MI command during Debug - Helios [message #1789932 is a reply to message #1723869] Thu, 31 May 2018 22:00 Go to previous message
Gregg Wonderly is currently offline Gregg WonderlyFriend
Messages: 3
Registered: May 2018
Junior Member
Actually, it still does not work. The problem is that the --attach doesn't have a correct argument implementation. There should just be a checkbox labeled "Attach to Pid: " with the ability to enter the PID to attach to. That should in turn cause the "download app" to be unchecked, and the requirement for a working remote path to the executable to be voided. Right now, there are a couple of ways to get a valid command line, that I found, but none are allowing the debugging session to actually work. Oxygen is confused.

You can add --attach to the "Gdbserver options:" field on the Gdbserver Settings sub tab of the Debugger tab, and then either put the PID after the port number (then you see this error above), or you can place the PID in the "Remote Absolute file Path for C/C++ Application:" field on the Main tab.

In this last case, it shows connected and their are "stop" buttons active, but no "pause" or "resume" buttons. The Debug pane doesn't show any thread details either, so its really not working.
Previous Topic:Using Build Output Parser With Custom Language
Next Topic:How to remove the console from the release exe?
Goto Forum:
  


Current Time: Thu Mar 28 20:35:27 GMT 2024

Powered by FUDForum. Page generated in 0.08678 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top