Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2008-03-24 19:36:18 +0000
committereutarass2008-03-24 19:36:18 +0000
commit00d9873796602ccaeb0fd6b38bdbb60ba262407a (patch)
tree9824e0d5650eacd73316b21093b1cc1dceb39f13 /plugins/org.eclipse.tm.tcf
parentbad0750d295717b96bc1b75d6c192f8268b0ed8a (diff)
downloadorg.eclipse.tcf-00d9873796602ccaeb0fd6b38bdbb60ba262407a.tar.gz
org.eclipse.tcf-00d9873796602ccaeb0fd6b38bdbb60ba262407a.tar.xz
org.eclipse.tcf-00d9873796602ccaeb0fd6b38bdbb60ba262407a.zip
1. Debug services RunControl, Breakpoints, Memory, Registers and StackTrace now work on Windows and CygWin.
2. Added missing error checks on all pthreads calls. 3. Fixed Bug 222929: [tcf] "Processes attach <ID>" command generates an invalid TCF message
Diffstat (limited to 'plugins/org.eclipse.tm.tcf')
-rw-r--r--plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java38
1 files changed, 21 insertions, 17 deletions
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java
index 40ddf0ae3..a2ed0c0e7 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java
+++ b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/internal/tcf/services/remote/MemoryProxy.java
@@ -55,27 +55,30 @@ public class MemoryProxy implements IMemory {
MemoryErrorReport(String msg, Number addr, Object ranges) {
super(msg);
Collection<Map<String,Object>> c = (Collection<Map<String,Object>>)ranges;
- this.ranges = new Range[c.size()];
- int n = 0;
- BigInteger addr_bi = addr instanceof BigInteger ?
- (BigInteger)addr : new BigInteger(addr.toString());
- for (Map<String,Object> m : c) {
- Range r = new Range();
- Number x = (Number)m.get("addr");
- BigInteger y = x instanceof BigInteger ?
- (BigInteger)x : new BigInteger(x.toString());
- r.offs = addr_bi.subtract(y).intValue();
- r.size = ((Number)m.get("size")).intValue();
- r.stat = ((Number)m.get("stat")).intValue();
- r.msg = Command.toErrorString(m.get("msg"));
- assert r.offs >= 0;
- assert r.size >= 0;
- this.ranges[n++] = r;
+ this.ranges = c == null ? null : new Range[c.size()];
+ if (c != null) {
+ int n = 0;
+ BigInteger addr_bi = addr instanceof BigInteger ?
+ (BigInteger)addr : new BigInteger(addr.toString());
+ for (Map<String,Object> m : c) {
+ Range r = new Range();
+ Number x = (Number)m.get("addr");
+ BigInteger y = x instanceof BigInteger ?
+ (BigInteger)x : new BigInteger(x.toString());
+ r.offs = addr_bi.subtract(y).intValue();
+ r.size = ((Number)m.get("size")).intValue();
+ r.stat = ((Number)m.get("stat")).intValue();
+ r.msg = Command.toErrorString(m.get("msg"));
+ assert r.offs >= 0;
+ assert r.size >= 0;
+ this.ranges[n++] = r;
+ }
+ Arrays.sort(this.ranges);
}
- Arrays.sort(this.ranges);
}
public String getMessage(int offset) {
+ if (ranges == null) return null;
int l = 0;
int h = ranges.length - 1;
while (l <= h) {
@@ -95,6 +98,7 @@ public class MemoryProxy implements IMemory {
}
public int getStatus(int offset) {
+ if (ranges == null) return BYTE_UNKNOWN;
int l = 0;
int h = ranges.length - 1;
while (l <= h) {

Back to the top