Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] MI-debugger for embedded applications

> 
> I want to use the CDT in order to develop embedded applications for V850 and 
> ARM.
> The current used tool chain is the GNU-TOOLS 3.3.2 with GDB 6.0.
> I loaded the the cylin embedded CDT plugin several times but it's unstable 
> with my linux environment and with this tool chain.
> 

Do you mean the zylin extras from Oyvind ?
Then send him email, I think he'll be more then receptive to feedbacks.
Note, I think his latest stuff will only work with CDT head and Eclipse-3.1 Milestone 4

> Now I made some modifications in the CDT sources in order to evaluate the 
> behavior of the CDT with the MI debug interface.
> The result seems stable.
> 
> My modifications:
> 
> Unfortunately i couldn't insert the load command in the GDB command file 
> (dosn't work). Moreover that would be long winded.
> Hence I wrote a new class "MILoad" and inserted it into the
>     createLaunchSession() method in the
>     GDBServerCDIDebugger class after the invocation of TargetSelect.
> 

Why not making your own launcher doing the extra steps.
There are examples plugin in the archive on how to do this.

> Then the debugger was running but during the termination of the debug process 
> the application was hanged.
> 
> The first reason was the line:
>       session.postCommand0(abort, -1); // do not wait for the answer.
> in  MIInferior: terminate()
> 
> I've replaced it by session.postCommand() with a wait for the answer.
> Otherwise CDT got the answer later and was totally confused.
> What is the sense of "no wait for answer"?
> 

It is a very long discussion with Oyvind spawning across lots of PR.
But basically, the rationale is; the users have finish the debug session
and there is no reason to synchronize with the "abort" command and if it fails
(and it does many times, for x reasons, gdb can not kill the inferior)
we still go through the termination sequence  and exit GDB.

> Another problem is the terminate() method in MISession.
> After the call of "postCommand0(exit, 2000)", eclipse hangs totally.
> I don't now why, but the problem dosn't occur with a "Thread.sleep(2000)" 
> before the "postCommand()"
> 

Are you using Windows ?

> Which way do you prefer for future development of the CDT-debugger? A 
> dedicated embedded debugger plugin or the enhancement of the MI debugger 
> interface?
> 

Both ...
Make a private plugin and for fixes that should be in the general common
MI base code;  a PR with a patch and the rationale.

For example what you describing above seems to be general problems but experience
tells us, it may be specific to your version of gdb 8-(
Not all ports of gdb are equal.

> I have not a deep insight into the CDT project but i hope, we can suggest the 
> use of eclipse CDT for the user application development.
> 



Back to the top