We should let ISymbolProvider focus on function/symbol names,
and use a separate interface for source code locations.
Change-Id: Iab4bbe0945f8ab1f633eadb862885a86dccde708
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Reviewed-on: https://git.eclipse.org/r/77553
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
@Override
public @Nullable String getSymbolText(int pid, long timestamp, long address) {
@Override
public @Nullable String getSymbolText(int pid, long timestamp, long address) {
- TmfCallsite callsite = getSymbolInfo(pid, timestamp, address);
+ BinaryCallsite bc = UstDebugInfoBinaryAspect.getBinaryCallsite(getTrace(), pid, timestamp, address);
+ if (bc == null) {
+ return null;
+ }
+
+ TmfCallsite callsite = UstDebugInfoSourceAspect.getSourceCallsite(getTrace(), bc);
return (callsite == null ? null : callsite.getFunctionName());
}
return (callsite == null ? null : callsite.getFunctionName());
}
@Override
public @Nullable TmfCallsite getSymbolInfo(int pid, long timestamp, long address) {
BinaryCallsite bc = UstDebugInfoBinaryAspect.getBinaryCallsite(getTrace(), pid, timestamp, address);
@Override
public @Nullable TmfCallsite getSymbolInfo(int pid, long timestamp, long address) {
BinaryCallsite bc = UstDebugInfoBinaryAspect.getBinaryCallsite(getTrace(), pid, timestamp, address);
return fMapping.get(Long.toHexString(address));
}
return fMapping.get(Long.toHexString(address));
}
@Override
public @Nullable ITmfCallsite getSymbolInfo(long address) {
loadConfiguration(null);
@Override
public @Nullable ITmfCallsite getSymbolInfo(long address) {
loadConfiguration(null);
* the symbol address
* @return always null
*/
* the symbol address
* @return always null
*/
@Override
public @Nullable ITmfCallsite getSymbolInfo(long address) {
return null;
@Override
public @Nullable ITmfCallsite getSymbolInfo(long address) {
return null;
* the address of the symbol
* @return the symbol {@link ITmfCallsite} information or null if the symbol
* cannot be found
* the address of the symbol
* @return the symbol {@link ITmfCallsite} information or null if the symbol
* cannot be found
+ * @deprecated This interface should only provide function/symbol names, not
+ * full source locations.
@Nullable ITmfCallsite getSymbolInfo(long address);
/**
@Nullable ITmfCallsite getSymbolInfo(long address);
/**
* the address of the symbol
* @return the symbol {@link ITmfCallsite} information or null if the symbol
* cannot be found
* the address of the symbol
* @return the symbol {@link ITmfCallsite} information or null if the symbol
* cannot be found
+ * @deprecated This interface should only provide function/symbol names, not
+ * full source locations.
default @Nullable ITmfCallsite getSymbolInfo(int pid, long timestamp, long address) {
return getSymbolInfo(address);
}
default @Nullable ITmfCallsite getSymbolInfo(int pid, long timestamp, long address) {
return getSymbolInfo(address);
}