Raised This Month: $ Target: $400
 0% 

Accesing metamod modules by cvar address


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 07-15-2012 , 12:26   Accesing metamod modules by cvar address
Reply With Quote #1

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?
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode