Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] launching a gdb from inside a docker container using DSF/GDB

Oops, that last message really was from me.

~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com

On 24 March 2016 at 13:55, Tracy Miranda <tracy@xxxxxxxxxxxxxxxx> wrote:
Hi Tim,

Thanks for the extra context.


On Thu, Mar 24, 2016 at 12:53 PM, Tim Orling <ticotimo@xxxxxxxxx> wrote:

The environment-cd is done in the final launch sequence. The existing dsf-gdb code assumes that gdb is on the same machine as eclipse, and in the docker case while that is true in a physical world sense, it certainly isn't true in other senses. Therefore I think you'll have to update final launch sequence somewhere along the way.

Understood and working in that direction now. But any pointers would be appreciated.

Since you are already using the example as a base, I will continue from there.

In your Final Launch Sequence [1] you should override getExecutionOrder and modify the result of super's getExecutionOrder to remove stepSetEnvironmentDirectory [2] from the array. That will prevent the environment-cd completely. 

Another approach may be to add a translation layer onto the paths from host to container. That is allow Final Launch Sequence to do the environment-cd, but then gives you a chance to translate the path. A good way to do that would be by creating a custom MI Command class like MIEnvironmentCD [3] that translates the string. Then in your custom command factory [4] override createMIEnvironmentCD [5] to return an instance of your new class. You will probably want to update whatever IGDBBackend.getGDBWorkingDirectory() uses to get the path to do the reverse translation too.

HTH

Jonah







_______________________________________________
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