> I am trying to explore the capabilities of the GNU Debugger and I found > out that it can detect program variables during runtime even though the > program is not compiled with -g option.
Its because the symbol table is not stripped which has the virtual address mappings of the variables(symbol names). even though you may not compile your program with -g (which essentially adds line and file info to the executable), the symbol table will have the virtual address's of the functions and you can put a break point at that virtual address. Note to put break point you just need to know the virtual address, break point is essentially overwriting the contents of this virtual address with a software interrupt instruction. Hope this helps :) -- Sincerely, Vamsi kundeti.
