gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GDB Algorithm to monitor program variables


From: vamsi krishna
Subject: Re: GDB Algorithm to monitor program variables
Date: Mon, 19 Nov 2007 02:12:31 -0500

>      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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]