delorie.com is funded by banner ads.
  www.delorie.com/djgpp/v2faq/faq102.html   search  

| Previous | Next | Up | Top |

12.9 GDB cannot display or set static uninitialized variables

Q: Why can't I set or display the values of some static variables in my program?


A: This seems to be a limitation of the COFF debugging information currently used by GDB and its derivatives (RHGDB and the debugger built into RHIDE): they cannot display or set the value of an uninitialized static variables (those who are in the .bss section of the program). A work-around is to initialize these variables, which causes the linker to put them into the .data section. Another solution is to use the stabs debugging support; latest versions of GCC include this support, so upgrade.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright ⌐ 1998   by Eli Zaretskii     Updated Sep 1998  

Powered by Apache!

You can help support this site by visiting the advertisers that sponsor it! (only once each, though)