fuchsia: Fix compilation after hasty review changes

I'm a dope. I really need to get the trybots enabled again,
but unfortunately I haven't made any useful progress on
https://bugs.chromium.org/p/crashpad/issues/detail?id=219.

Bug: crashpad:196
Change-Id: Iba2a2460d36c17d8261f82deb6cabaab5995111b
Reviewed-on: https://chromium-review.googlesource.com/1012464
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
This commit is contained in:
Scott Graham 2018-04-13 11:47:26 -07:00 committed by Commit Bot
parent ca2d7e776a
commit 799dcef4c9
2 changed files with 11 additions and 9 deletions

View File

@ -15,7 +15,7 @@
#ifndef CRASHPAD_SNAPSHOT_FUCHSIA_CPU_CONTEXT_FUCHSIA_H_
#define CRASHPAD_SNAPSHOT_FUCHSIA_CPU_CONTEXT_FUCHSIA_H_
#include <zircon/syscall/debug.h>
#include <zircon/syscalls/debug.h>
#include "build/build_config.h"
#include "snapshot/cpu_context.h"

View File

@ -222,15 +222,17 @@ void ProcessReaderFuchsia::InitializeThreads() {
} else {
thread.state = thread_info.state;
}
}
zx_thread_state_general_regs_t regs;
status = zx_thread_read_state(
thread_handle.get(), ZX_THREAD_STATE_GENERAL_REGS, &regs, sizeof(regs));
if (status != ZX_OK) {
ZX_LOG(WARNING, status) << "zx_thread_read_state";
} else {
thread.general_registers = regs;
zx_thread_state_general_regs_t regs;
status = zx_thread_read_state(thread_handles[i].get(),
ZX_THREAD_STATE_GENERAL_REGS,
&regs,
sizeof(regs));
if (status != ZX_OK) {
ZX_LOG(WARNING, status) << "zx_thread_read_state";
} else {
thread.general_registers = regs;
}
}
threads_.push_back(thread);