Re: [anjuta-devel] AVR GDB integration



Hi Lucas,


Le 31/07/2011 14:20, Lucas van Dijk a écrit :
When you've created an AVR project, there's no 'debug platform' yet set.
By debug platform I mean the simulator or AVaRICE. So when the user
clicks 'Debug program' for the first time, it has to show a dialog where
the user can select the debug platform, along with some configuration
options.

This is not easy to do without any change in Anjuta. Perhaps we can do it by checking the return value from ianjuta_debugger_load. But then we need to know which dialog to display, so perhaps we could add these option in the program parameter dialog with a custom widget like in the configure dialog?


Also add a menu 'AVR->debugger options' with shows the same dialog as
described above, allowing the user to change the configuration.

That will be fine, except for the issue above.


When debugging starts, first the gdb server must be started, running
simulavr or avarice, and then the gdb client has to be started,
debugging remotely on the right port given in the configuration dialog.
Breakpoint at the main function (debug->run option must be disabled
because the AVR is always running when there's power), and use continue
to start the program.
When debugging ends, also quit the GDB server.

If needed I think you can connect to debugger signal.


Now a few questions:
- How to override the 'Debug program' command

Nothing special needed, just load a plugin implementing IAnjutaEnvironment and it will get called to allow it to modify the debugging command.


- What is the best way to launch the GDB server (Probably using
AnjutaLauncher?)

Depending if you need to send or receive data using stdin/stdout. If yes, anjuta_launcher is better else you can use g_spawn_*.


Regards,

Sébastien



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]