[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-debug-dev] Reusing CDT gdb-MI-interface code
|
>
> Hi,
>
> I am using Eclipse as development platform for a DSP.
>
> I have a question related to my debugger:
> Currently, I am using gdb as static information manager (line to pc, pc
> to line, etc) , and the DSP simulator as the target.
> I have modified gdb to read the executable (ELF) and debug information
> (Dwarf2) and I verified that all the information I need can be retrieved
> from gdb. I did not implement the target support in gdb since I use it
> only for static information.
> I wonder if I can reuse CDT code that interface gdb using the MI
> interface, to get static information.
> (By 'static', I mean all the information available through gdb after
> loading the executable to debug, but before calling 'run' command.)
>
> I will be happy if someone can kindly point out the classes/packages in
> CDT I should use/extend .
>
> To make things clear, I will give few examples to the kind of interface
> I am looking for:
> getSourceLocationFromPc( int pc ), getPcFromSourceLocation( File file,
> int line ), getLocalVarsInSourceLocation( File file, int line ).
>
Good idea.
We did not put this in, although it should be quite easy to add it.
So far in the eclipse debug framework/UI there was no need for it.
But if you can come up with a clean Interface(set of methods) of
what you need we could work things and put it in the CDI and implement
it in the GDB/MI plugin. The annoying thing is that GDB/MI does not
have any "mi" command for this, so we will have to send "cli" command
and do weird parsing on the output.