This is the mail archive of the 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]

Re: Asynchronous GDB

On Thu, 4 Jan 2001, Eli Zaretskii wrote:

> > Date: Thu, 4 Jan 2001 15:10:05 -0500 (EST)
> > From: Jamie Guinan <>
> > 
> > I'm interested in GDB's ability to run asynchronously, like being able to
> > examine and modify values without stopping the debugged program.  
> Forgive me a possibly stupid question, but what does it mean, in
> practice, to examine and modify values without stopping the debugged
> program?  If the debuggee continues to run, the values continue to
> change right under your feet, yes?  So how do you make sense out of
> several values you examine, without having a clue whether they are
> consistent with each other or not?

Yes, values could certainly change under your feet, and the user should
consider that when doing asynchronous debugging.

My interest is in embedded applications.  For a trivial example, suppose
you had a program that had to run without stopping, such as reading rotary
encoders attached to live machinery, or routing ATM packets in a core
network environment.  You might have counters in your code that you would
want to examine, and while the exact numbers might change, you might want
to know whether a value at a given instant is on the order of 5 or 1000 or
1000000.  Snapshots, essentially.  Or you might have polled flag variables
in your program that enable or disable certain features, you could use GDB
to set them.  Since GDB knows where objects are located from the symbol
table, and it can interpret data structures, it would be a valuable tool
in this kind of situation.

> I see that I was right to add this snippet to the docs: at least we
> don't pretend that we do something when the truth is otherwise ;-)

Yes, thanks for documenting that, I would have thought I was doing
something wrong/stupid (not unusual) when it didn't work.  :)


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