CheckPoint : fix a bug for making request protocol
authorjungwook.ryu <jungwook.ryu@samsung.com>
Wed, 15 Jul 2015 04:46:03 +0000 (13:46 +0900)
committerjungwook.ryu <jungwook.ryu@samsung.com>
Wed, 15 Jul 2015 04:48:23 +0000 (13:48 +0900)
"PointerArray" variable type of CheckPoint.

Change-Id: I8ae53037ad76c8514499a453740ca69ed5ada933
Signed-off-by: jungwook.ryu <jungwook.ryu@samsung.com>
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/protocol/p40/Communicator40.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/interactive/model/InteractiveInfo.java

index e57443b..f002035 100644 (file)
@@ -443,7 +443,9 @@ public class Communicator40 extends Communicator30 {
                long registerOffset = info.getRegisterOffset();
                byte registerNum = (byte) info.getRegisterID();
                int dataSize = info.getByteSize();
-               if (info.getArrayCount() > 0) {
+               if (info.isPointerArray()) {
+                       dataSize = info.getPointerSize() * info.getArrayCount();
+               } else if (info.isArray()) {
                        dataSize *= info.getArrayCount();
                } else if (info.isString()) {
                        dataSize = 0;
@@ -473,10 +475,14 @@ public class Communicator40 extends Communicator30 {
        protected void makeFBISteps(InteractiveInfo info, FunctionBodyInstrumentVariable40 variable) {
                InteractiveInfo cursorInfo = info;
                while (cursorInfo != null) {
+                       int pointerOrder = cursorInfo.getPointerOrder();
+                       if (info.isPointerArray()) {
+                               pointerOrder = 0;               // just request list of pointer address, not value.
+                       }
                        // Add sequence is important. Do not change sequence without consideration.
                        if (cursorInfo == info) {
                                FunctionBodyInstrumentStep40 step = new FunctionBodyInstrumentStep40(
-                                               (byte) cursorInfo.getPointerOrder(), 0);
+                                               (byte) pointerOrder, 0);
                                variable.addStep(step);
                        }
                        InteractiveInfo parentInfo = cursorInfo.getParent();
index 7aa5301..b1a715b 100644 (file)
@@ -310,6 +310,10 @@ public class InteractiveInfo {
                return (pointerOrder > 0);
        }
 
+       public boolean isPointerArray() {
+               return (isArray() && isPointerType());
+       }
+       
        public void getAllRelatedVariableIDs(List<Long> variableIDList, int checkLocation) {
                switch (checkLocation) {
                case CHECK_BEFORE_LINE: