This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Newbie with a several doubts


quinty wrote:
Hello,

Let me introduce myself, I am John from Spain, and I am developing a
new application in Linux.

In this moment I have a important doubt, is it possible to watch a var
without stop program???.
Is it possible to insert code in my application to use it with gdb and
debug my programm??

I am not sure if my questions are silly or not.

Hello John,


I'm not sure if I understand your question(s).

Regarding the first question, there is an "async mode"
in which gdb can do limited debuging on a program that is
not stopped.  I don't know enough about async mode, perhaps
someone who knows it better than I can answer.

In the normal debugging mode, gdb cannot look at the
value of a variable without stopping the program.
However, it can be a brief stop -- eg. set a breakpoint,
and when the breakpoint is hit, print the value and
then immediately continue again.

Regarding your second question -- you can write a function
into your program and then let gdb call the function.
But the program has to be stopped in order for gdb to
do that.

Hope this helps...
Michael



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]