Fix "process load/unload" on android

On android the symbols exposed by libdl (dlopen, dlclose, dlerror)
prefixed by "__dl_". This change moves the handling of process
load/unload to the platform object and override it for android to
handle the special prefix.

Differential revision: http://reviews.llvm.org/D11465

llvm-svn: 254504
This commit is contained in:
Tamas Berghammer
2015-12-02 11:58:51 +00:00
parent 8b5dc2c94e
commit 3cb132a0f4
11 changed files with 352 additions and 265 deletions

View File

@@ -1297,7 +1297,8 @@ SBProcess::LoadImage (lldb::SBFileSpec &sb_image_spec, lldb::SBError &sb_error)
if (stop_locker.TryLock(&process_sp->GetRunLock()))
{
Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
return process_sp->LoadImage (*sb_image_spec, sb_error.ref());
PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
return platform_sp->LoadImage (process_sp.get(), *sb_image_spec, sb_error.ref());
}
else
{
@@ -1322,7 +1323,8 @@ SBProcess::UnloadImage (uint32_t image_token)
if (stop_locker.TryLock(&process_sp->GetRunLock()))
{
Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
sb_error.SetError (process_sp->UnloadImage (image_token));
PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
sb_error.SetError (platform_sp->UnloadImage (process_sp.get(), image_token));
}
else
{