[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-debug-dev] Reusing CDT gdb-MI-interface code
|
>
> Thanks,
>
> I think I will extend the classes supplied by the CDT to add another
> command.
> I just need to get (file,line) from pc, pc from (file,line) and symbol
> information. ( I can take it from both gdb and elf-parser )
> BTW, why does elf-parser execute addr2line to get line from address ?
Because ELF is not a debug format.
> All the information is in the elf debug section...
We could provide Stabs.java later that would help for stabs.
But it is the tip off the iceberg.
> Yet, you need to create parser for verious debug formats, such as dwarf
> or coff.
>
Yes, Dwarf, Dwarf-2, Stabs, Stabs++, PE/COFF etc ... with some of them
having bizarre platform extension and quirks.
Reinventing GNU BFD(binutils) ... patches are welcome.
> Haim
>
> Alain Magloire wrote:
> >>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.
> >
> >
> >
> > _______________________________________________
> > cdt-debug-dev mailing list
> > cdt-debug-dev@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
>
> --
>
>
> ________________________________________
> Haim Cohen
> Software Engineer
> haim.cohen@xxxxxxxxxx
> Analog Devices
> Israel
> (972) - 9 - 9715 406
>
> _______________________________________________
> cdt-debug-dev mailing list
> cdt-debug-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
>
--
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!