|
From: Josef W. <Jos...@gm...> - 2005-08-12 09:31:45
|
On Friday 12 August 2005 09:51, Tom Hughes wrote: > Remembering symbols after an unmap is hard - the problem is that a > future dlopen could reuse the same addresses so it means storing > temporal information of some sort with all the backtraces. This has > been discussed in depth numerous times in the past. Temporal information is not really needed. You have to convert the address to "time-independent" information at the time the stacktrace is taken. The backtraces could store (mapped object, offset) instead of a pure address. "mapped object" being a small struct with the object name which is not to be discarded. When a object is re"dl"opened, one would have to make sure that it is identified as the old one. But you still have the problem with discarded debug info to map offsets to symbol names. You also would have to store the symbol names themself in the backtraces (or some IDs together with a string table). Actually, in callgrind I have "context objects" which are similar to stacktraces, and they stay valid after dlclose's. I am doing the above. Josef > > Tom |