Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse Variable expansion not applied to GDB launch(How to create shareable debug configurations)
Eclipse Variable expansion not applied to GDB launch [message #1740877] Fri, 19 August 2016 09:50 Go to next message
David Cozens is currently offline David CozensFriend
Messages: 4
Registered: January 2016
Junior Member
I am trying to create a debug configuration that can be shared across a team. Developers typically have the code somewhere under their own home directory, so I don't want any absolute paths in the debug configuration. I appear to be very close to having this working, the only absolute path that I am left with is the path to the application in Debug Configurations->Main->C/C++ Application:

I have tried specifying this using a variable of this form
Quote:

${workspace_loc:/path/program}

which works fine when I launch as a run, however when I try to debug gdb fails because the variable hasn't been expanded.

Quote:

Error in final launch sequence
Failed to execute MI command:
-file-exec-and-symbols ${workspace_loc::/path/program}
Error message from debugger back end:
${workspace_loc::/path/program}: No such file or directory.
${workspace_loc::/path/program}: No such file or directory.


It would be great if there was a future improvement that expanded these variables before passing to the gdb launch. In the meantime any ideas on how to make this portable.

I am using eclipse neon, under Ubuntu 14.04 debugging a local application.
Re: Eclipse Variable expansion not applied to GDB launch [message #1740905 is a reply to message #1740877] Fri, 19 August 2016 16:38 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
This enhancement would be easy to do. Could you open a bugzilla about it?

In the mean time, could you get it to work by importing the project in the developer's workspace and then using a 'relative' path to the binary?
Re: Eclipse Variable expansion not applied to GDB launch [message #1740917 is a reply to message #1740905] Fri, 19 August 2016 18:02 Go to previous messageGo to next message
David Cozens is currently offline David CozensFriend
Messages: 4
Registered: January 2016
Junior Member
I've not managed to find a way of getting this to work with relative paths. I'll file a bugzilla. For now each used has to edit a path after loading the launch config - not huge deal but not would be great to be fully portable.
Re: Eclipse Variable expansion not applied to GDB launch [message #1740919 is a reply to message #1740917] Fri, 19 August 2016 18:12 Go to previous messageGo to next message
David Cozens is currently offline David CozensFriend
Messages: 4
Registered: January 2016
Junior Member
Bug raised 500002
Re: Eclipse Variable expansion not applied to GDB launch [message #1743285 is a reply to message #1740919] Wed, 14 September 2016 02:05 Go to previous messageGo to next message
Lazaro Mendoza is currently offline Lazaro MendozaFriend
Messages: 1
Registered: September 2016
Junior Member
Hi there, after configuration of gdb version on eclipse I start getting additional error in building project, the message say
Error starting process.
Exec_tty error:Cannot run program "/Users/myuser/Documents/workspace/workspace-c++/test1/src/
test1.cpp": Unknown reason

I hope you can help me

Thanks
Re: Eclipse Variable expansion not applied to GDB launch [message #1743353 is a reply to message #1743285] Wed, 14 September 2016 14:15 Go to previous message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
> "/Users/myuser/Documents/workspace/workspace-c++/test1/src/test1.cpp"

Notice this is your source code file and not the binary.
In the launch, you need to specify the binary that was built using the above source file.

Marc
Previous Topic:Types could not be resolved
Next Topic:xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at:
Goto Forum:
  


Current Time: Fri Apr 26 22:37:37 GMT 2024

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

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

Back to the top