Register Based Local Double Variable Values Are Not Being Displayed in the CW PA V10.3/10.5 Debugger "Variables" Window

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Register Based Local Double Variable Values Are Not Being Displayed in the CW PA V10.3/10.5 Debugger "Variables" Window

603 Views
Freebooter
Contributor I

When examining the value of a function local variable of type "double" that is held in a FP register (not on the stack), the value of the variable presented in the debugger "Variables" window and in a tool tip (when placing the mouse cursor over the variable in the source window) - the value always reads zero. I have to go to the "Register" window and examine the actual FP register to get the variable value.

 

We have been using CW PA V10.3 for years where we have been seeing this issue on a consistent basis. I have never found any prior reference to this problem in the Freescale (NXP) support areas up to this point. I have recently installed V10.5.2 for evaluation and am seeing the same problem.

 

Is this a documented issue and if so is there a plan to address it?

 

Thanks,

Mike Patterson

Omni Flow Computers

Labels (1)
0 Kudos
Reply
2 Replies

490 Views
addiyi
NXP Employee
NXP Employee

Could you please provide a short code example to reproduce your issue?

0 Kudos
Reply

490 Views
Freebooter
Contributor I

In our source we have not been marking any local variables with the "register" keyword. The variables are just allocated by the compiler to be held in registers as an optimization. The following function has been stripped down for space reasons. In this function the compiler places the dDenMin variable in a register. When I set a breakpoint on the line indicated below the dDenMin variable reads 0.0 in both the Variables window and in the tooltip. The dDenMax variable (on the stack) reads correctly. Hope this helps. It is difficult to give you sample code that definitively demonstrates the issue.

DWORD ProcessApi1162(WORD wApiFunct, void *pApi11In)

{

    WORD wIterationDex, wTableSelect;

    double dAlpha60;

    double dTemp, dDen60Sqr, dE, dDeltaDen60;

    double dTerm, dDenMin, dDenMax, dDeltaT, dDeltaTx1P6, dDt, dDiffAlpha, dDp;

    if(wTableSelect == PROD_SPECIAL_APPS || wTableSelect == PROD_TAB_24C || wTableSelect == PROD_TAB_6C)

    {

        /* validate Alpha 60 */

        if(dAlpha60 < (float)0.00023 || dAlpha60 > (float)0.00093)

                return (DPCL_SETFCID(FCID_API11P1) | DPCL_SETECLASS(ECLASS_ARG_INVALID) | DPCL_SETECODE(ECODE_ALPHA));  

    }

    else    // validate Density 60

    {

        switch(wTableSelect)

        {

        case PROD_CRUDE:

        case PROD_TAB_23A_24A:

        case PROD_TAB_5A_6A:

            dDenMin = 470.5;

            dDenMax = 1201.8;

            break;                         // set breakpoint here - dDenMin reads 0.0 while dDenMax reads 1201.8

        case PROD_REFINED:

        case PROD_TAB_23B_24B:

        case PROD_TAB_5B_6B:

            dDenMin = 470.4;

            dDenMax = 1209.5;

            break;

        case PROD_LUBE_OIL:

        case PROD_TAB_53D_54D:

        default:

            dDenMin = 714.3;

            dDenMax = 1208.3;

            break;

        }

    }

    return (DPCL_SETFCID(FCID_API11P1) | DPCL_SETECODE(ECODE_SUCCESS)); // 7-28-11

}

0 Kudos
Reply