I was trying to hook functions in metamod modules using an amxmodx module and I found that, in linux using
dladdr within the cvar pointer registered by the metamod module (even with amxmodx) can't be mapped to an already opened library.
For example
Code:
cvar_t *a = CVAR_GET_POINTER("amx_client_languages");
Dl_info info;
dladdr((void *)a, &info)
Here
dladdr returns 0, so it can't find the associated library for that memory address.
Using GDB I found the address is in non-allocated space by any library loaded...
It's really strange. At least should be engine_i686.so.
If I do the same with mp_timelimit or sv_proxies I get the corresponding library (CS or ENGINE).
Some time ago I was trying to do this with orpheu using the included method to define additional libraries and I get the same error.
It's possible that last updates on engine changed something about how cvar pointers works?
Anyone has similar problems?
__________________