Correct use of Debug.Evaluate when writing RTOS-aware plug-in

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Correct use of Debug.Evaluate when writing RTOS-aware plug-in


      I'm writing an Ozone RTOS plugin for MQX.

      Within Ozone's watch window, I can see the structure containing the data of interset, but I don't seem to be able to correctly read this structure within the *.js file
      As far as I can tell, my approach (attached) mirrors the Debug.evaluate example given in UM08025, but I'm getting 'undefined' when attempting to access any structure member following the successful evaluation check.

      What am I missing?

      Many thanks

    • Hello,

      Thank you for your inquiry.
      Such an issue is not known to us.
      Which Ozone version are you using currently? Is it the latest 3.20h?
      If not could you give that a try?

      Best regards,
      Please read the forum rules before posting: Forum Rules

      Keep in mind, this is not a support forum. Its main purpose is user to user interaction.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system:

      Or you can contact us via e-mail.
    • Hi Nino

      Release 3.22 does resolve a couple of issues I was seeing, however the cause of this particular issue remains and appears to relate to the casting of the address

      The structure 'kernel_data_struct' has a typedef of KERNEL_DATA_STRUCT_PTR, if I use this i.e.

      var KernelData = Debug.evaluate("*(KERNEL_DATA_STRUCT_PTR)" + 0x60050074c);

      KernelData contains the expected results.

      However, If I use:

      var KernelData = Debug.evaluate("*(struct kernel_data_struct *)" + 0x60050074c);

      i.e. the 'original' data type used in the typedef, attempting to acccess any member data within KernelData results in 'undefined'. So it appears that if there's a typedef for the pointer, you must use that when casting within Debug.evaluate and not the 'original' data type.

      Not sure if this is expected behaviour, but I mention it in case it's helpful.