This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: About the concept of the callback
- From: Andrew Cagney <cagney at gnu dot org>
- To: libra <mr924352 at cs dot nthu dot edu dot tw>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 26 Jan 2004 16:48:08 -0500
- Subject: Re: About the concept of the callback
- References: <1074910594.4011d5820b3b1@webmail.cs.nthu.edu.tw>
> 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