Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Local variables debugging

Altera_Forum
Honored Contributor II
911 Views

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.
0 Kudos
0 Replies
Reply