Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

Local variables debugging

Hallo,

I have problem with function's local variable debugging. I'm trying watch function's local variable values in nios2-debug and also nios2-elf-gdb. Both of deguggers doesn't work with this variable, which has -1 value for all debbugging time and I'm not able to stepping program. Btw this variable has not static address in memory.

Problem I mentioned is with 'irq_id' variable in example:

int function(const void* xxx)

{

int irq_id = 0; /* cycle index */

for (irq_id = 0; irq_id < 32; irq_id++) {

...

}

return (NO_ERROR);

}

When I tried to declare function&#39;s local variable &#39;irq_id&#39; as &#39;staic&#39;, debuggers works correctly, but I think that debuggers must work with &#39;auto&#39; declared function&#39;s local variables...

I&#39;m using GNU based development tools only, not NiosII IDE.

Thank you for some motive.
No RepliesBe the first to reply