Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2010-05-05 23:06:26 -0400
committereutarass2010-05-05 23:06:26 -0400
commit1571bb8aa1fe7300e4578d1545e8aa353abe1889 (patch)
tree379a260c974a7e2b53c1ba60eba257d9a5ed2fd2 /plugins/org.eclipse.tm.tcf.debug
parenta7573ae8119e60578d9d0cc156a603e6f77132c1 (diff)
downloadorg.eclipse.tcf-1571bb8aa1fe7300e4578d1545e8aa353abe1889.tar.gz
org.eclipse.tcf-1571bb8aa1fe7300e4578d1545e8aa353abe1889.tar.xz
org.eclipse.tcf-1571bb8aa1fe7300e4578d1545e8aa353abe1889.zip
TCF Agent: fixed regression: Registers.getm returns no data
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
index 41217f293..460d633b3 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
@@ -921,22 +921,30 @@ class TestRCBP1 implements ITCFTest,
}));
}
if (!reg_map.isEmpty()) {
+ int data_size = 0;
List<IRegisters.Location> locs = new ArrayList<IRegisters.Location>();
String[] ids = reg_map.keySet().toArray(new String[reg_map.size()]);
for (int i = 0; i < rnd.nextInt(32); i++) {
String id = ids[rnd.nextInt(ids.length)];
IRegisters.RegistersContext ctx = reg_map.get(id);
if (!ctx.isReadable()) continue;
+ if (!ctx.isWriteable()) continue;
if (ctx.isReadOnce()) continue;
+ if (ctx.isWriteOnce()) continue;
int offs = rnd.nextInt(ctx.getSize());
int size = rnd.nextInt(ctx.getSize() - offs) + 1;
locs.add(new IRegisters.Location(id, offs, size));
+ data_size += size;
}
+ final int total_size = data_size;
final IRegisters.Location[] loc_arr = locs.toArray(new IRegisters.Location[locs.size()]);
cmds.add(rg.getm(loc_arr, new IRegisters.DoneGet() {
public void doneGet(IToken token, Exception error, byte[] value) {
cmds.remove(token);
if (suspended.get(sc.id) != sc) return;
+ if (error == null && value.length != total_size) {
+ error = new Exception("Invalid data size in Registers.getm reply");
+ }
if (error != null) {
for (IToken t : cmds) t.cancel();
exit(error);

Back to the top