Skip to main content

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

> > The user at project creation(in the wizard), can choose=20
> > now only "Elf" and "Coff" shows but we could put:
> >=20
> > "GNU Binutils"
> > "Tensilica Tools"
> >=20
> > The binary parser can be change in property page.
> For a non-managed project, yes, I can see where you
> might want to explicitly set the binary parser to use.
> For a managed build project - one that identifies a build
> target, and a toolchain to use when building for that target -

addr2line, objdump, nm, etc ..  are not necessaryly Build tools.

The C Model do some work on binaries to get information for different
modules, debugger, launcher etc ...

> I'd think that the binary parser should be specified by
> the toolchain itself (similar to the way Chris Songer
> described in a previous message).

Are you referring to the "IBinToolProvider".

 * Some of the CDT needs to run binary tools (addr2line, objdump 
 * and c++filt are the ones I have found so far.). We need to be
 * providing those tools from code that depends on the CDT. This
 * is the way we are doing that.
public interface IBinToolProvider
/** @return string with the addr2line path */
public String getAddr2line();

/** @return string with the c++filt path */
public String getCPPFilt();

/** @return string with the objdump path */
public String getObjdump();

/** @return the objectdump args (there's been a lot of change here */
public String [] getObjdumpArgs(IPath path);

IMO, the problem is that they return strings, what to do with them ?
If you want to pass certain arguments?  Where do you do the parsing
addr2line from Qnx maybe slightly different from  the default breaking

If you really want this, I would advocate to define an interface
on what the tools should do:

public interface IAddr2line {

	String getFilename();

	int getLinenumber();

	int getAddress();

etc ..

And this is in away the proposal of the IBinaryParser extension point
it integrate in one common interface/extension point, addr2line, ar, etc ..

Back to the top