Warn and be ok with symbol services failing.
This commit is contained in:
parent
8bf5eba098
commit
06ba273492
|
@ -140,10 +140,15 @@ bool Processor::Setup() {
|
|||
frontend_ = std::move(frontend);
|
||||
|
||||
// Stack walker is used when profiling, debugging, and dumping.
|
||||
// Note that creation may fail, in which case we'll have to disable those
|
||||
// features.
|
||||
stack_walker_ = StackWalker::Create(backend_->code_cache());
|
||||
if (!stack_walker_) {
|
||||
XELOGE("Unable to create stack walker");
|
||||
return false;
|
||||
// TODO(benvanik): disable features.
|
||||
if (FLAGS_debug) {
|
||||
XELOGW("Disabling --debug due to lack of stack walker");
|
||||
FLAGS_debug = false;
|
||||
}
|
||||
}
|
||||
|
||||
// Open the trace data path, if requested.
|
||||
|
|
|
@ -58,6 +58,7 @@ struct StackFrame {
|
|||
class StackWalker {
|
||||
public:
|
||||
// Creates a stack walker. Only one should exist within a process.
|
||||
// May fail if another process has mucked with ours (like RenderDoc).
|
||||
static std::unique_ptr<StackWalker> Create(backend::CodeCache* code_cache);
|
||||
|
||||
// Dumps all thread stacks to the log.
|
||||
|
|
|
@ -106,7 +106,7 @@ bool InitializeStackWalker() {
|
|||
options |= SYMOPT_FAIL_CRITICAL_ERRORS;
|
||||
sym_set_options_(options);
|
||||
if (!sym_initialize_(GetCurrentProcess(), nullptr, TRUE)) {
|
||||
XELOGE("Unable to initialize symbol services");
|
||||
XELOGE("Unable to initialize symbol services - already in use?");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ std::unique_ptr<StackWalker> StackWalker::Create(
|
|||
backend::CodeCache* code_cache) {
|
||||
auto stack_walker = std::make_unique<Win32StackWalker>(code_cache);
|
||||
if (!stack_walker->Initialize()) {
|
||||
XELOGE("Unable to initialize stack walker");
|
||||
XELOGE("Unable to initialize stack walker: debug/save states disabled");
|
||||
return nullptr;
|
||||
}
|
||||
return std::unique_ptr<StackWalker>(stack_walker.release());
|
||||
|
|
Loading…
Reference in New Issue