Eclipse "Error in final launch sequence: Command '-file-exec-and-symbols myprog.exe' is timed out - c++

I am using
Eclipse IDE for C/C++ Developers
Version: 2018-09 (4.9.0)
Build id: 20180917-1800
under Win 10 with Portable Msys2, and gcc 8.3.0.
When launching a debug configuration in CDT, I am getting message
Error in final launch sequence: Command '-file-exec-and-symbols myprog.exe' is timed out
Session is terminated
Reason: Commnd '-gdb-exit' is timed out
Note: I only get this error while trying to debug one project.
All my other debug configurations for other projects run with no problem.
I have copied one of these working debug configurations and changed only the project name and executable into the problematic one, and I still get the error.
One possible solution I found is (here and here) downgrading component
C/C++ GDB Hardware Debugging (Help -> About Eclipse IDE -> Installation Details -> C/C++ GDB Hardware Debugging)
from 9.4.0.201712051550 to 9.3.2.201709131603.
I have
Version 9.5.3.201809121146 org.eclipse.cdt.debug.gdbjtag.feature.group Eclipse CDT.
Perhaps in my case downgarding to that old version would work too.
Prior to messing up with the downgrading, I meant to try another option (here and here):
In the debug configuration of the project, in the debugger tab, uncheck
“Reset and Delay (seconds)” and
“Halt”.
(more details here)
But I couldn't find these settings in the Debugger tab, and I do not have the Startup tab under either the Debug configuration for my project or GDB Hardware Debugging, as shown here or here.
See image.
Where can I find these settings?
Are there any other alternatives to try solving the issue, other than these two? (lest reinstalling, e.g.)
I am looking for something that allows me to debug my project, so far I cannot.
References I found for similar topics (although not exactly the same) are:
Error in Final Launch Sequence - Eclipse System Workbench Debugging for STM32L476
http://www.openstm32.org/forumthread6323

Related

can't do remote-debugging with j-link in Clion IDE

I am trying to remote-debug a project in Clion but I can't seem to get a working debugging session. I think I've correctly launched my gdb server/client because my gdb client connects to the JLinkGDBServerCL.exe process
and they communicate.However, in clion, I can't break in the source code. The only thing that I get from clion is a disassembly of my program with no symbol at all which is odd because there is a symbol table in the .elf
that I am trying to debug. And one last detail, I can't "step in" the assembly code neither (but I can run commands in the gdb client in Clion).
Here is a picture of my debug configuration : debug config
And here is what I'm talking about when I say I can't get a proper debugging session : "debugging session"
Does anybody know what the problem is ?
System info:
OS: Windows 10
IDE: Clion 2018.1.6
GDB Server: JLinkGDBServerCL.exe
Target: TM4C129 (cortex M4) (no OS, just a firmware)
Program: USBMicroloader.elf (debug mode)
I'm having the same issue. I found that if I add the path to the elf file from the build directory into the "Symbol file" (in the run configuration where you set up the remote gdb connection), it fixes your issue. This seems a bit kludgey, but I haven't been able to find a better solution.
However, the next issue I run into is that I can only run that configuration a single time. When I stop debugging I get a message in the console that reads Remote doesn't know how to detach. Debugger disconnected. The clean and build menu options are greyed out until I restart CLion.

How to enable multithreading for Linux app in Visual Studio 2017

I'm currently developing an multithreaded application for Linux in VS 2017.
As Remote Linux machine I use built-in Ubuntu bash in Windows, which was the part of anniversary update.
Compilation goes fine, the build is succesful. But right after running the program following error occurs.
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
I tried to fiddle with linking and compilation settings. But I just blew the entire project.
Did anybody encountered and solved this kind of problem? Thanks.
Edit: this thread was flagged as duplicate. Let me explain why I think this is different. I'm developing on Windows host with VS2017, and Im trying to achieve working debugging in VS2017. I cannot edit directly the compilation routine commands as in suggested duplicate thread.
I know that #Andrey Turkin has already given the answer in the comments. I want to add it as Answer here as not all will read the comments. I have been searching for the same for 2 days now and #Andrey Turkin helped me solve this. Please follow his comment to clear this problem.
Assuming platform toolset is "Remote_GCC_1_0"; all you need to do is add "-pthread" to compile and link command lines. VS configuration maps most g++ options to specific configuration values, but not this one. Go to project's configuration, "C/C++ -> All Options", add "-pthread" to "Additional Options" configuration value. Go to "Linker -> All Options" and do the same.

Breakpoints do not work on CDT 8.4.0 for Eclipse Luna for Linux

I had good times debugging Java applications on Eclipse, but recently that I'm working on a C/C++ on Ubuntu 12.04 using Eclipse CDT, it ignores the breakpoints when debugging! I've tried two versions of Eclipse CDT, CDT 8.4.0 for Eclipse Luna, but doesn't work either. Can somebody help with that?
NOTE: I know there are some other similar questions, but I was thinking it is better to ask this question which specifically addresses CDT 8.4.0 for Eclipse Luna.
The eclipse-cdt is shipped only with the required tools for building c/c++ applications. It does not ship with gdb. You need to install that separately
How do I use GDB in Eclipse for C/C++ Debugging?
From link above these are the steps to follow.
1. Go to Help > Install New Software.
2. Add the CDT repository http://download.eclipse.org/tools/cdt/releases/8.4 to the list of repositories.
3. Select the CDT Repository. Now you need to install the CDT plugin along with GDB support from the list of available plugins (Select the CDT Main Features as well as CDT GNU Toolchain Debug support).
I updated the CDT repository path to correspond to your release (Luna).
It also happens for me in ReadHat 64
Seems like if the CDT breakpoints are not suitable for the current debug session, in the breakpoint window, when enabling "Show breakpoints Supported by selected target" all my breakpoints disapears from the list.
In my case, my ELF have debug info and all the breakpoints that I place are in the main ELF.
My debug settings worked fine with the former Eclipse version.
I rolled back to eclipse Juno, and my debug session with same elfs worked out of the box.
Experiencing the same problem here.. I am working around it by manually setting breakpoints after starting debug session. Console -> gdb, then type "break xxxx".
If you're using MinGW gdb, check that C:\MinGW\bin is in your path (set in System Properties). Made all the difference for me.
I once had Skip All Breakpoints accidentally checked, and was wondering what was going on.
I have the same problem with my eclipse Photon, I figured it out by unchecking the
"stop on startup at: main" in Debug Configuration-->Debugger.
I know this in Rikard Söderström's response to you.

Eclipse CDT C++ RDT remote fast indexer for AIX not working

I am developing C++ code for AIX 6.1, and using eclipse CDT and RDT plugin to load the project on windows and edit it. But I am not able to index the code using RDT remote fast indexer.
Have started daemon.pl script on AIX on default port.
I have enabled Code indexing in Service configuration property in Remote Development tab of eclipse preferences. I have not found much help on google too. I keep getting errors of
java not found or An internal error occurred during: "Open Declaration".
java.lang.NullPointerException .
Has anyone faced similar issues on AIX? Please help.
Also havent been able to compile my remote project(using xlC compiler) or debug, which RDT promises to.
I found a solution in https://bugs.eclipse.org/bugs/show_bug.cgi?id=108951
-> Increase cache limits of indexer (in workspace's preferences or project's properties).
-> Then rebuild index

Juno CDT plugin failing to run a C++ application

I have a simple mixed C/C++ application (OpenGL example) which I have successfully built using Eclipse CDT in Juno (MinGW toolchain).
I can run this application fine by hand from a Win7 command console, but it seems to rarely work when running from Eclipse's "Run as" menu. Whether it works or not seems down to seemingly unrelated changes in the code, and I get nothing of interest on the Eclipse run console (just a <terminated> status) even when no code near the start of the application has changed.
I'd like to and it sometimes I can work around this for now, but would be good to get this working if anyone has any ideas - it seems an essential stepping stone to get the debug environment working in Eclipse.
EDIT Side thought - eclipse seems awfully thin on debug diagnostics when something like this fails. If there is any way to turn on more debug I'd welcome the knowledge =)
Resolved - the issue is down to the path being given to the application, or more specifically the OS launcher (so it can find the DLLs it needs).
Even through the default "run" config claims to inherit the parent environment, it doesn't seem to get the same environment as the Win7 command console. I had to manually edit the "Run as" config in Eclipse to have a custom PATH environment variable containing the directories I needed (MinGW/bin, and a directory containing some custom DLLs).
Cheers, Iso