mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Add some useful android logging for post-mortem debugging
This commit is contained in:
@@ -630,6 +630,10 @@ extern "C" RENDERDOC_API ReplayStatus RENDERDOC_CC RENDERDOC_StartAndroidRemoteS
|
||||
|
||||
std::vector<Android::ABI> abis = Android::GetSupportedABIs(deviceID);
|
||||
|
||||
RDCLOG("Starting RenderDoc server, supported ABIs:");
|
||||
for(Android::ABI abi : abis)
|
||||
RDCLOG(" - %s", ToStr(abi).c_str());
|
||||
|
||||
if(abis.empty())
|
||||
return ReplayStatus::UnknownError;
|
||||
|
||||
|
||||
@@ -173,4 +173,18 @@ std::string GetFriendlyName(std::string deviceID)
|
||||
|
||||
return combined;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
template <>
|
||||
std::string DoStringise(const Android::ABI &el)
|
||||
{
|
||||
BEGIN_ENUM_STRINGISE(Android::ABI);
|
||||
{
|
||||
STRINGISE_ENUM_CLASS(unknown);
|
||||
STRINGISE_ENUM_CLASS(armeabi_v7a);
|
||||
STRINGISE_ENUM_CLASS(arm64_v8a);
|
||||
STRINGISE_ENUM_CLASS(x86);
|
||||
STRINGISE_ENUM_CLASS(x86_64);
|
||||
}
|
||||
END_ENUM_STRINGISE();
|
||||
}
|
||||
@@ -69,3 +69,5 @@ std::string GetPathForPackage(const std::string &deviceID, const std::string &pa
|
||||
|
||||
bool PatchManifest(std::vector<byte> &manifest);
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_ENUM(Android::ABI);
|
||||
@@ -157,6 +157,8 @@ bool InjectLibraries(const std::string &deviceID, Network::Socket *sock)
|
||||
case Android::ABI::x86: libPath += "lib/x86"; break;
|
||||
}
|
||||
|
||||
RDCLOG("Injecting RenderDoc from library in %s", libPath.c_str());
|
||||
|
||||
if(conn.IsErrored())
|
||||
return false;
|
||||
|
||||
@@ -377,13 +379,12 @@ bool InjectLibraries(const std::string &deviceID, Network::Socket *sock)
|
||||
// call Runtime.load() on our library. This will load the library and from then on it's
|
||||
// responsible for injecting its hooks into GLES on its own. See android_hook.cpp for more
|
||||
// information on the implementation
|
||||
value ret =
|
||||
conn.InvokeInstance(thread, runtime, load, runtimeObject.Object,
|
||||
{conn.NewString(thread, libPath + "/libVkLayer_GLES_RenderDoc.so")});
|
||||
value ret = conn.InvokeInstance(thread, runtime, load, runtimeObject.Object,
|
||||
{conn.NewString(thread, libPath + "/" RENDERDOC_ANDROID_LIBRARY)});
|
||||
|
||||
if(ret.tag != Tag::Void)
|
||||
{
|
||||
RDCERR("Failed to call load()!");
|
||||
RDCERR("Failed to call load(%s/%s)!", libPath.c_str(), RENDERDOC_ANDROID_LIBRARY);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user