use of org.eclipse.cdt.core.IBinaryParser.ISymbol in project linuxtools by eclipse.
the class CallGraphDecoder method decodeCallGraphRecord.
/**
* Decode call-graph record from gmon file.
* @param stream
* @throws IOException
*/
public void decodeCallGraphRecord(DataInput stream, boolean bsdFormat) throws IOException {
long from_pc = readAddress(stream);
long self_pc = readAddress(stream);
int count = bsdFormat ? (int) readAddress(stream) : stream.readInt();
IBinaryObject program = decoder.getProgram();
IAddressFactory addressFactory = program.getAddressFactory();
IAddress parentAddress = addressFactory.createAddress(Long.toString(from_pc));
ISymbol parentSymbol = program.getSymbol(parentAddress);
IAddress childAddress = addressFactory.createAddress(Long.toString(self_pc));
ISymbol childSymbol = program.getSymbol(childAddress);
if (childSymbol == null || parentSymbol == null) {
return;
}
addCallArc(parentSymbol, parentAddress, childSymbol, count);
}
use of org.eclipse.cdt.core.IBinaryParser.ISymbol in project linuxtools by eclipse.
the class CGArc method getFunctionName.
public String getFunctionName() {
Object o = this.getParent();
CGCategory category = (CGCategory) o;
ISymbol symbol;
if (CGCategory.CHILDREN.equals(category.category)) {
symbol = arc.child.getSymbol();
} else {
symbol = arc.parent.getSymbol();
}
return STSymbolManager.sharedInstance.demangle(symbol, arc.getProject());
}
use of org.eclipse.cdt.core.IBinaryParser.ISymbol in project linuxtools by eclipse.
the class CGArc method getSourcePath.
@Override
public String getSourcePath() {
Object o = this.getParent();
CGCategory category = (CGCategory) o;
if (CGCategory.CHILDREN.equals(category.category)) {
ISymbol symbol = arc.child.getSymbol();
return ((HistRoot) getRoot()).decoder.getFileName(symbol);
} else {
if (arc.parentPath == null) {
// $NON-NLS-1$
return "??";
}
return arc.parentPath;
}
}
use of org.eclipse.cdt.core.IBinaryParser.ISymbol in project linuxtools by eclipse.
the class HistRoot method addCallGraphNode.
/**
* Add a callgraph node to the tree representation of the gmon file
* @param node
*/
public void addCallGraphNode(CallGraphNode node) {
ISymbol s = node.getSymbol();
String path = decoder.getFileName(s);
HistFile hf = getChild(path);
hf.addCallGraphNode(node);
}
Aggregations