Re: GDB Algorithm to monitor program variables

"vamsi krishna" <[email protected]>
Newsgroups gmane.comp.gdb.general
Message-ID <[email protected]>
>      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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.