mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-26 11:50:59 +00:00
Move loadmodule/getprocaddress code into os_specific
This commit is contained in:
@@ -451,22 +451,16 @@ void Process::StartGlobalHook(const char *pathmatch, const char *logfile, const
|
||||
RDCUNIMPLEMENTED("Global hooking of all processes on linux");
|
||||
}
|
||||
|
||||
bool Process::LoadModule(const char *module)
|
||||
void *Process::LoadModule(const char *module)
|
||||
{
|
||||
return dlopen(module, RTLD_NOW) != NULL;
|
||||
return dlopen(module, RTLD_NOW);
|
||||
}
|
||||
|
||||
void *Process::GetFunctionAddress(const char *module, const char *function)
|
||||
void *Process::GetFunctionAddress(void *module, const char *function)
|
||||
{
|
||||
void *handle = dlopen(module, RTLD_NOW);
|
||||
if(module == NULL) return NULL;
|
||||
|
||||
if(handle == NULL) return NULL;
|
||||
|
||||
void *ret = dlsym(handle, function);
|
||||
|
||||
dlclose(handle);
|
||||
|
||||
return ret;
|
||||
return dlsym(module, function);
|
||||
}
|
||||
|
||||
uint32_t Process::GetCurrentPID()
|
||||
|
||||
Reference in New Issue
Block a user