[Gambas-devel] Enhancing the gb.debug component

Matteo Lisi matteo.lisi at ...648...
Mon Feb 1 09:50:57 CET 2010


Hi, Benoît.

Before start , let's make a small remote debug session simulation.

Suppose I wrote a program on PC and I want to debug it on my target 
machine. I made also a gambas component for the SPI (ex. gb.spi), that 
use a peripheral that exists only on target system and not on PC system. 
I thought that on pc all the method of gb.spi must be empty , I need 
only that the (sorry for the definition) intellisense work, while on ARM 
system the components is fully functional.

When I press the debug button I need to copy the source directory on 
target system, and run the compiler on it.

If I'm a good coder I have no error, but if I get an error, I have to 
redirect it on gambas IDE.

Is it possible to compile on my PC system and only when the compilation 
is done, move the project directory on my target system ?
When I compile on PC and move on ARM system which gb.spi the executable 
use ? In this manner I haven't to redirect the compiler output from 
target system to PC system .

At this point ON PC system I call the gbx2 with 2 argument the first 
that tell to executor to use a tcp socket and the second which address 
it must connect. ON Target system the gbx2 will be launch with only an 
argument that tell to became a server and than use the tcp socket for 
exchange the debug data.

Is this mechanism correct ?

What do you think about it ?

Il 30/01/2010 16.52, Benoît Minisini ha scritto:
> Hi, Matteo.
>
> This is for you, but I want that all the discussion stays on the mailing-list,
> for other people interested in.
>
> The gb.debug component sources are located in the /main/lib/debug directory of
> Gambas sources.
>
> main.c -->  Component initialization and component classes declaration.
>
> debug.c -->  The internal debugger, run by the interpreter when the "-g" option
> is passed to it.
>
> print.c -->  Debugger functions to print values of expressions, variables...
>
> CDebug.c -->  The Debug class, used by the IDE for driving a debugged process.
> Fifo that communicate with the debugged process are created there.
>
> gb.debug.h -->  Declaration of the API provided by the interpreter to the
> gb.debug component, and the API provided by the gb.debug component to the
> interpreter.
>
> Please look into the source code first, and ask me questions. This way, I will
> be able to understand what your C skills are, which will help me to guide you
> more easily.
>
> Regards,
>
>    
>
>
>
> Nessun virus nel messaggio in arrivo.
> Controllato da AVG - www.avg.com
> Versione: 9.0.733 / Database dei virus: 271.1.1/2654 -  Data di rilascio: 01/28/10 20:36:00
>
>    


-- 
------------------------------------------------------------------------
http://www.engicam.com <http://www.engicam.com>


*ENGICAM s.r.l.*
Progettazione di sistemi elettronici
50018 Scandicci - FIRENZE
Via dei Pratoni, 16 int. 13 O-N
P.I. 05389070482

http://www.freescale.com <http://www.freescale.com> › Matteo Lisi 
<mailto:matteo.lisi at ...648...>
( +39 055 7311387
6 +39 055 7318333
------------------------------------------------------------------------
NOTICE: This message and attachments are intended only for the use of 
their addresses and may contain confidential information belonging to 
Engicam. If you are not the intended recipient, you are hereby notified 
that any reading, dissemination, distribution, or copying of this 
message, or any attachment, is strictly prohibited. If you have received 
this message in error, please notify the original sender immediately and 
delete this message, along with any attachments.




More information about the Devel mailing list