mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 13:28:01 +03:00
android stuff
This commit is contained in:
parent
11e214f332
commit
798c194025
11 changed files with 304 additions and 236 deletions
|
@ -126,15 +126,17 @@ namespace utils
|
|||
std::vector<void*> get_backtrace(int max_depth)
|
||||
{
|
||||
std::vector<void*> result(max_depth);
|
||||
#ifndef ANDROID
|
||||
int depth = backtrace(result.data(), max_depth);
|
||||
|
||||
result.resize(depth);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
std::vector<std::string> get_backtrace_symbols(const std::vector<void*>& stack)
|
||||
{
|
||||
std::vector<std::string> result;
|
||||
#ifndef ANDROID
|
||||
result.reserve(stack.size());
|
||||
|
||||
const auto symbols = backtrace_symbols(stack.data(), static_cast<int>(stack.size()));
|
||||
|
@ -144,6 +146,7 @@ namespace utils
|
|||
}
|
||||
|
||||
free(symbols);
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue