Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] customizing binary parsers (addr2line/objdump/friends)

ive followed the MBS docs and now i have a nice toolchain definition
which declares my compiler/linker/assembler.  the next step is the
binary parser and changing the defaults from (the inappropriate)
"addr2line", "objdump", etc... to my versions (it's a GNU
cross-compiler, so really i just need to stick the relevant prefix
before the commands).  this step doesnt seem to be documented in the
eclipse sdk at all, and from googling, i can only find old hits about
people creating custom binary parsers that extend existing ones and
merely replacing the functions that return program names.  from
digging through the cdt code, this appears to be the sop.  can anyone
confirm (or even better, point me in the direction to do it nicely via
existing xml mechanism)?

atm, i'm doing stuff like:
public class my_DefaultGnuToolFactory extends DefaultGnuToolFactory {
    <override the get*Path() functions>
}
public class my_ElfParser extends GNUElfParser {
    protected IGnuToolFactory createGNUToolFactory() {
        return new BFINDefaultGnuToolFactory(this);
    }
}

seems kind of hokey after all the simplistic extension interface the
toolchain has via xml
-mike


Back to the top