Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] objdump/addr2line problems

> At 03:51 PM 7/2/2003 -0400, Alain Magloire wrote:
> >For example, Tensilica could provide its own implementation.
> >
> >public class TensilicaBinaryParser implements IBinaryParser {
> >....
> >}
> I'm not sure I totally understand the suggestion.

It is possible to provide an implementation of the IBinaryParser extension/interface
with addr2line, objdump, nm, ar and file.

> In 1.0.1 there is no way to change out the binutils used under ElfParser 
> without writing branched versions of So in 1.0.1, the suggestion 
> above would have us write new versions of, and 
> at the very least. should be change to make this possible, maybe by making
more methods "protected" or adding new methods say:

Elf.setAddr2line (IAddr2line addr2line);

> Would this still have to be done for the TensilicaBinaryParser in the 
> suggestion above?
> For the record, just putting in our addr2line (and other binary utils) via 
> an extension point made it all just work.

Then  the default implementation is good enough for your case and we should
think of a way to extend, maybe something like.

public class TensilicaElf extends Elf {
	public String getAddr2line () {
		// return the righ path of the addr2line
		// it should be in the PATH.
		return "tensilica-addr2line"

Back to the top