Question

In a release build I'm getting the following informational warning from GCC 4.4.7.

note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without

Have I exceeded the variable name length supported by variable tracking assignment?
If so, is there a way to adjust the supported size?

Was it helpful?

Solution

This is just a note from the compiler that the debug info for the particular function will have lower quality, because your code of function is too large/complex so variable tracking reached limit of hash table slots.

The max is likely lot of millions and it can be raised with something (like --param=max-vartrack-size=60000000) but you could end up with very slow compilation or the compiler could take very lot of memory to compute the debug info location lists.

So unless you have trouble debugging the code just ignore that warning.

OTHER TIPS

My warning reads: with -fvar-tracking-assignments, retrying without

if you care about it linking twice, you could set -fno-var-tracking-assignments in the makefile instructions to avoid that retry.

The Variable Tracking Assignments feature is used to track use of variables in inlined code. The information is used by debuggers and tools (notably, gdb and Visual Studio Code). If you exceed the cache size, your debugger and tools may not be able to display variable values in inlined code.

You can increase the size of the variable tracking cache using the following GCC option:

--param=max-vartrack-size=n

The default is 10000, so the following might be a good starting point:

--param=max-vartrack-size=200000
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top