diff options
author | Eugene Tarassov | 2012-04-17 17:15:35 +0000 |
---|---|---|
committer | Eugene Tarassov | 2012-04-17 17:15:35 +0000 |
commit | 4ebdcfad592556991f9681c2e1aa0df5b9fb6630 (patch) | |
tree | 1da4b32de90829c3d6891625c3b856e1e384c7e3 /plugins | |
parent | 8739cdba5550a829cefe9ee8a5ec2af6843d31b8 (diff) | |
download | org.eclipse.tcf-4ebdcfad592556991f9681c2e1aa0df5b9fb6630.tar.gz org.eclipse.tcf-4ebdcfad592556991f9681c2e1aa0df5b9fb6630.tar.xz org.eclipse.tcf-4ebdcfad592556991f9681c2e1aa0df5b9fb6630.zip |
TCF Core: new method in ISymbols service interface: getLocationInfo
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/SymbolsProxy.java | 16 | ||||
-rw-r--r-- | plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ISymbols.java | 56 |
2 files changed, 68 insertions, 4 deletions
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/SymbolsProxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/SymbolsProxy.java index f237fd42f..19a1f85be 100644 --- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/SymbolsProxy.java +++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/SymbolsProxy.java @@ -274,6 +274,22 @@ public class SymbolsProxy implements ISymbols { }.token; } + public IToken getLocationInfo(String symbol_id, final DoneGetLocationInfo done) { + return new Command(channel, this, "getLocationInfo", new Object[]{ symbol_id }) { + @Override + @SuppressWarnings("unchecked") + public void done(Exception error, Object[] args) { + Map<String,Object> props = null; + if (error == null) { + assert args.length == 2; + error = toError(args[0]); + props = (Map<String,Object>)args[1]; + } + done.doneGetLocationInfo(token, error, props); + } + }.token; + } + public IToken findFrameInfo(String context_id, Number address, final DoneFindFrameInfo done) { return new Command(channel, this, "findFrameInfo", new Object[]{ context_id, address }) { @Override diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ISymbols.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ISymbols.java index 8177f9f54..8b8ca07af 100644 --- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ISymbols.java +++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ISymbols.java @@ -433,14 +433,14 @@ public interface ISymbols extends IService { CMD_NUMBER = 1, /** Load a register value to the evaluation stack. Command argument is the register ID. */ - CMD_REGISTER = 2, + CMD_RD_REG = 2, /** Load frame address to the evaluation stack. */ CMD_FP = 3, /** Read memory at address on the top of the evaluation stack. Command arguments are * the value size (Number) and endianness (Boolean, false - little-endian, true - big-endian). */ - CMD_DEREF = 4, + CMD_RD_MEM = 4, /** Integer arithmetic and bit-wise boolean operations */ CMD_ADD = 5, @@ -463,11 +463,59 @@ public interface ISymbols extends IService { /** Evaluate DWARF location expression. Command arguments are byte array of * DWARF expression instructions and an object that contains evaluation parameters. */ - CMD_LOCATION = 20; + CMD_LOCATION = 20, + + CMD_FCALL = 21, + CMD_WR_REG = 22, + CMD_WR_MEM = 23, + CMD_PIECE = 24; + + /** + * @deprecated + */ + static final int + CMD_REGISTER = 2, + CMD_DEREF = 4; + + /** + * Symbol location properties. + */ + static final String + /** Number, start address of code range where the location info is valid, or null if it is valid everywhere */ + LOC_CODE_ADDR = "CodeAddr", + /** Number, size in bytes of code range where the location info is valid, or null if it is valid everywhere */ + LOC_CODE_SIZE = "CodeSize", + /** Number, number of argument required to execute location instructions */ + LOC_ARG_CNT = "ArgCnt", + /** List, instructions to compute object value location, e.g. address, or offset, or register ID, etc. */ + LOC_VALUE_CMDS = "ValueCmds", + /** List, instructions to compute dynamic array length location */ + LOC_LENGTH_CMDS = "LengthCmds"; + + /** + * Retrieve symbol location information. + * @param symbol_id - symbol ID. + * @param done - call back interface called when operation is completed. + * @return - pending command handle. + */ + IToken getLocationInfo(String symbol_id, DoneGetLocationInfo done); + + /** + * Client call back interface for getLocationInfo(). + */ + interface DoneGetLocationInfo { + /** + * Called when location information retrieval is done. + * @param token - command handle. + * @param error – error description if operation failed, null if succeeded. + * @param props - symbol location properties, see LOC_*. + */ + void doneGetLocationInfo(IToken token, Exception error, Map<String,Object> props); + } /** * Retrieve stack tracing commands for given instruction address in a context memory. - * @param context_id - exacutable context ID. + * @param context_id - executable context ID. * @param address - instruction address. * @param done - call back interface called when operation is completed. * @return - pending command handle. |