LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Identifier 'xxx' unknown is unknown (from View Variable Value)

Hi,

 

I'm using LabWindows/CVI 8.1

 

What would cause LabWindows to not be able to display any variables accessed from within a subroutine that a breakpoint occurred in.  Some of the variables are defined and initialized locally in the routine before the breakpoint.  Some are the routine's arguements.

Some are global variables that can be viewed in other routines (in other modules?).  The routine runs fine otherwise and steps with no problems.  The only variable's values that I can view are global defines.  If I step through to the exit to calling routine in the same module, I can view all in scope variables with no problems.

 

Vance

0 Kudos
Message 1 of 9
(3,208 Views)

Hi Vance,

 

I just want to clarify a few things.  Did this behavior just begin happening, or have you always had issues viewing variables within functions that a break point ocurred in?  Does this happen within one specific fuction, or all functions that have a break point happen in them?  When you say you can see all of the variables in the scope of the subroutine when exiting to the calling function, do you mean before you actually step out of the function, or after you return to the caller?  Thanks!

Shelby S
National Instruments
Applications Engineer
0 Kudos
Message 2 of 9
(3,175 Views)

Shelby S.,

 

Thanks for the response and sorry it has taken me so long to respond.

To answer your questions:

1) no, the behavor has been there as long as I have been using LabWindows (4 months).

2) It only seems to occur in some of the functions in this module.  I am refering to functions that I have set a breakpoint that has tripped.

3) I mean after I have stepped out of the function, where the breakpoint occurred and  where I can't see any values, through a return, to the calling routine; in which I can see variable values again.  Of course, not those that were local in the break pointed routine.

 

Vance

0 Kudos
Message 3 of 9
(3,112 Views)

Hi,

 

You said this only occurs within some of the functions that you have break points set in.  Is there anything common between the functions that you can't see the variables in, as opposed to the fucntions that the variables display properly?  Such as how they are called or defined.

Shelby S
National Instruments
Applications Engineer
0 Kudos
Message 4 of 9
(3,091 Views)

Thanks Shelby for attempting to help me with this!

 

I don't see any pattern.

 

In the example below of two routines, I set a breakpoint at the line marked with the label a: in the 2nd routine checkSIMSforSessions.  I show a portion of it including the local variable declarations.  At that point, I can view the value of all variables that are being referenced by that routine, including the values of those being passed as arguments.  Now, when I step into the called routine getDlogSessionHeader, I can't see the view the value of anything except constants that are defined by #define.  I can't view the arguments, the local variables that are initialized in the declaration like index or retries, or globally define variables (though I did not show any in the 1st routine in my example) etc.  These two routines are in the same source code file in the same order.

As I step into deeper calls, I remain unable to view variables until I step back into the original routine checkSIMSforSessions and then viewing works fine, even as I step back into the callers of this routine, etc.

 

Thanks again,

Vance

 

 

int getDlogSessionHeader( int portno, int dlogSessionNum, sessDlogHdrStruct *curSessionDlogHeader )
{
	char SCPI_OutBuffer[SIMSoutBufferSize];
	char SCPI_InBuffer[SIMSinBufferSize];
	unsigned int returnedSCPIuintValue;
	int triggerNum;
	int monitorNum;
	int tempTotalSessions;
	int result;
	int monitoredIndex;
	Section8Info *info;
	int index = 0;
	int retries = 0;
	int IDdifference;
.
.
.
}



int checkSIMSforSessions( void )
{
	int result;
	int numDlogSessionsInSIMS;
	int newNumDlogSessionsInSIMS;
	char message[256];
	// for retrieving non started session configuration
	unsigned short int triggerCompareValues[ triggerNumMax ];
	unsigned short int triggerIndexControlValues[ triggerNumMax ];
	unsigned short int monitorIndexes[ numMonitoredMax ];
	unsigned short int returnedValue;
	int triggerNum;
	int monitorNum;

#if ALLOW_OFFLINE_SIMS_DATALOG
#else
	if (system_stat.com == OFFLINE)
		return (FALSE);
#endif

.
.
.
	while (numDlogSessionsInSIMS--)
	{
a:		result = getDlogSessionHeader( SIMSportno, 1, &currentSessionDlogHdr );
		if (result <= ERROR_RETURN)
			break;
		result = appendDlogSessionToFile( SIMSportno, &currentSessionDlogHdr );
		if (result <= ERROR_RETURN)
			break;
		eraseDlogSession( SIMSportno, 1 );
	}
.
.
.
}

 

 

0 Kudos
Message 5 of 9
(3,016 Views)

Hi Vance,

 

Interesting, can you take a screen of the variables window?

 

Thanks!

Chris T.
0 Kudos
Message 6 of 9
(2,982 Views)

Again, sorry it has taken me so long to respond.

 

I am attaching the requested screen shot (the variables window).

In this example, I set a break point in a routine.  I can access all local & global variable values.  I trace through to a called routine and again, I can access all variable's values.  I do this a couple more levels until I reach this routine (getNextDlogFrame).  Now it won't show the local variable's values when I hover over the variable name or when I right click - "view variable value" or if I select it via the view menu item.  I can see the global defined values.  Unfortunately, it doesn't seem that I attempt to reference any other type global variables.  All the above mentioned routines are in the same source file.

But, thanks for suggesting that I send you a snapshot of the varibales window!  The local variable values are updated there so I can continue my debugging efforts.

 

Vance

0 Kudos
Message 7 of 9
(2,753 Views)

As a follow-up, a routine by routine variable viewing status:

routine with the breakpont:

int checkSIMSforSessions( bool promptIfSessions )
with locally defined:

    sessDlogHdrStruct tmpDlogHdr;
variable values can be viewed

traced through this call:

    result = getDlogSessionHeader( SIMSportno, ++currentDlogSessionNumber, &tmpDlogHdr );

To the routine:

int getDlogSessionHeader( int portno, int dlogSessionNum, sessDlogHdrStruct *curSessionDlogHeader )
can not view variables' values

traced through a called routine, can not view those variable's values either.

returned to calling routine (getDlogSessionHeader)

still can not view variables' values

returned to calling routine (checkSIMSforSessions)

still can view variables' values

Here is where the previously mentioned chain of calls occurs:

traced through this call:

      result = appendDlogSessionToFile( SIMSportno, &currentSessionDlogHdr );

to routine:

int appendDlogSessionToFile( int portno, sessDlogHdrStruct *curSessionDlogHeader )
variables can be viewed

traced through to this call:

            result = getSIMSDlogSessionDataFromSIMS( portno, curSessionDlogHeader );
to routine:

int getSIMSDlogSessionDataFromSIMS( int portno, sessDlogHdrStruct *curSessionDlogHeader )
variables can be viewed

traced through to this call:

        if ((result = getAllDlogSessionFrames( portno, curSessionDlogHeader )) <= ERROR_RETURN)
to routine:

int getAllDlogSessionFrames( int portno, sessDlogHdrStruct *curSessionDlogHeader )
variables can be viewed

traced through to this call:

    while ((result = getNextDlogFrame( portno, curSessionDlogHeader, dataPointer )) > ERROR_RETURN)
to routine:

int getNextDlogFrame( int portno, sessDlogHdrStruct *curSessionDlogHeader, double *logData )
can not view variables' values

This is where I was when I obtained the screen shot I attached to the previous message.

I suspect this won't help but I figure too much info is better than too little.

 

Vance

 

 

0 Kudos
Message 8 of 9
(2,747 Views)

Hey Vance,

 

Do you have access to any variables in these subroutines? To clarify, the subroutines experiencing this issue are repeatable, correct? Could you post a screen shot of the variables window within the subroutine?

 

Luke W

0 Kudos
Message 9 of 9
(2,730 Views)