Source navigator roadmap, features list, etc.?
Fri Sep 29 06:06:00 GMT 2000
Ben Elliston <email@example.com> writes:
> We could certainly flag assignments of function pointers, but there is
> no good static determination of when a function is actually called
> dereferencing a function pointer. This requires runtime analysis. And
> it could be wrong; the runtime analysis would have to have a reverse
> table of addresses to functions. A debugger could do this while the
> exe is running.
> Or worse, the function pointer could be determined by address
> arithmetic. As you say, there's only so much that can be done
Of course. There are inevitably limitations.
However, whenever a bit of code does something with something which is
a function pointer, then that's worth noting somewhere.
It's possible that it's never called, but it's surely more than likely
that it will be at some point (even though SN won't be able to tell
where it's called). Not just assignments, either: arguments to
functions ought to be stored somewhere (Tcl_CreateObjCommand and
similar spring to mind).
Bruce Stephens Bruce.Stephens@MessagingDirect.com
MessagingDirect(UK) Ltd <URL: http://www.MessagingDirect.com/ >
More information about the Sourcenav