This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to translate CMM-style command Data.Long(ZSD:&regAddr) in jython script

Hi,

I 'm translating a cmm script to  a jython script . Need to translate CMM-style command Data.Long(ZSD:&regAddr) .Not sure how to do it, especially about this flag ZSD. Would somebody guide me how to do it? Thanks.

Jerry

Parents
  • Hi Stephen,

    Thanks a lot for replying.

    There is Syntax Error. 

    source "init.py"
    ERROR(?): SyntaxError: no viable alternative at input ':'
    File "init.py", line 21
    status = debugger.readMemory(S:regAddr, 4)
    ^
    ERROR(CMD656): The script init.py failed to complete due to an error during execution of the script
    source "init.py"
    ERROR(?): SyntaxError: no viable alternative at input ':'
    File "init.py", line 23
    status = ec.getMemoryService().readMemory32(S:regaddr)
    ^
    ERROR(CMD656): The script init.py failed to complete due to an error during execution of the script
    
    

    Seems we can fix like this:

    a = "S:" + str(regaddr)
    ec = debugger.getCurrentExecutionContext()
    status = ec.getMemoryService().readMemory32(a)

    BTW, if we use debugger.readMemory. It's:

    value = debugger.readMemory(S:address, 32)

    not

    value = debugger.readMemory(S:address, 4)

    right?

    Jerry

Reply
  • Hi Stephen,

    Thanks a lot for replying.

    There is Syntax Error. 

    source "init.py"
    ERROR(?): SyntaxError: no viable alternative at input ':'
    File "init.py", line 21
    status = debugger.readMemory(S:regAddr, 4)
    ^
    ERROR(CMD656): The script init.py failed to complete due to an error during execution of the script
    source "init.py"
    ERROR(?): SyntaxError: no viable alternative at input ':'
    File "init.py", line 23
    status = ec.getMemoryService().readMemory32(S:regaddr)
    ^
    ERROR(CMD656): The script init.py failed to complete due to an error during execution of the script
    
    

    Seems we can fix like this:

    a = "S:" + str(regaddr)
    ec = debugger.getCurrentExecutionContext()
    status = ec.getMemoryService().readMemory32(a)

    BTW, if we use debugger.readMemory. It's:

    value = debugger.readMemory(S:address, 32)

    not

    value = debugger.readMemory(S:address, 4)

    right?

    Jerry

Children
No data