Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in final launch sequence Failed to execute MI command -gdb-set target-async off

I have two projects on eclipse, one produces an so and the other is Android application which uses it I am trying to debug the native code in the so using this guide.

  1. I set my application debuggable
  2. I started my application in the debug mode
  3. I run ndk-gdb

When I run the native debugger I am getting:

Error in final launch sequence
Failed to execute MI command:
-gdb-set target-async off
Error message from debugger back end:
Cannot change this setting while the inferior is running.
Cannot change this setting while the inferior is running.
like image 757
Yamen Ajjour Avatar asked Jan 22 '13 16:01

Yamen Ajjour


1 Answers

I found this link here link and actual author is marc.

Since you followed the guide and have installed CDT.

When CDT launches, it tries to set a breakpoint at main, so it will interrupt execution when your program starts. However, your target is already running so the breakpoint cannot be set and the whole things fails.

You could simply tell your launch not to set that breakpoint and let it connect to your target. Go to: Run->Debug Configurations... and find your launch configuration. Then select the Startup subtab, scroll down and uncheck "Set breakpoint at" in the "Runtime options" subsection.

****It may be also related to OS you are using since this is an issue with inferior execution.**** and thus a patch may be needed.But before doing anything try above.It may solve your issue.

Also removing the "target" command from the .gdbinit file may help as the eclipse plugin already issues this command.

If nothing works you may look for changing debugger because at last its a gdb compilation problem.

My answer is purely based on r&d.

like image 122
khakishoiab Avatar answered Oct 27 '22 01:10

khakishoiab