This is the mail archive of the gdb@sources.redhat.com 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: About the concept of the callback


> Hello everybody:
> 
> I am tracing the gdb source code now.
> 
> In the gdb source code,there use many callback function.

Can you be more specific?  Callbacks in gdb aren't that common.

> I don't understand why it uses callback.
> 
> Now, i know how to implement the callback function.
> 
> But, i still don't know why it must use the callback. 

It's kind of mimicing the OO "uses-a" relationship.  A common use is as
part of an interator - the iterator invokes the callback on each element.

> Anyone can tell me where is the document about the concept of the callback
> 
> that i can get.

Andrew




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