Fix clang warnings / move some plat code into poly.
This commit is contained in:
@@ -62,9 +62,9 @@ class BreakpointHitEvent : public DebugEvent {
|
||||
public:
|
||||
BreakpointHitEvent(Debugger* debugger, ThreadState* thread_state,
|
||||
Breakpoint* breakpoint)
|
||||
: thread_state_(thread_state),
|
||||
breakpoint_(breakpoint),
|
||||
DebugEvent(debugger) {}
|
||||
: DebugEvent(debugger),
|
||||
thread_state_(thread_state),
|
||||
breakpoint_(breakpoint) {}
|
||||
virtual ~BreakpointHitEvent() {}
|
||||
ThreadState* thread_state() const { return thread_state_; }
|
||||
Breakpoint* breakpoint() const { return breakpoint_; }
|
||||
|
||||
@@ -81,7 +81,7 @@ int Function::Call(ThreadState* thread_state, uint64_t return_address) {
|
||||
handler(thread_state->raw_context(), symbol_info_->extern_arg0(),
|
||||
symbol_info_->extern_arg1());
|
||||
} else {
|
||||
XELOGW("undefined extern call to %.8X %s", symbol_info_->address(),
|
||||
XELOGW("undefined extern call to %.8llX %s", symbol_info_->address(),
|
||||
symbol_info_->name());
|
||||
result = 1;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ bool Instrument::Detach() {
|
||||
}
|
||||
|
||||
FunctionInstrument::FunctionInstrument(Runtime* runtime, Function* function)
|
||||
: target_(function), Instrument(runtime) {}
|
||||
: Instrument(runtime), target_(function) {}
|
||||
|
||||
bool FunctionInstrument::Attach() {
|
||||
if (!Instrument::Attach()) {
|
||||
@@ -81,7 +81,7 @@ void FunctionInstrument::Exit(ThreadState* thread_state) {
|
||||
|
||||
MemoryInstrument::MemoryInstrument(Runtime* runtime, uint64_t address,
|
||||
uint64_t end_address)
|
||||
: address_(address), end_address_(end_address), Instrument(runtime) {}
|
||||
: Instrument(runtime), address_(address), end_address_(end_address) {}
|
||||
|
||||
bool MemoryInstrument::Attach() {
|
||||
if (!Instrument::Attach()) {
|
||||
|
||||
@@ -13,11 +13,11 @@ namespace alloy {
|
||||
namespace runtime {
|
||||
|
||||
RawModule::RawModule(Runtime* runtime)
|
||||
: name_(0),
|
||||
: Module(runtime),
|
||||
name_(0),
|
||||
base_address_(0),
|
||||
low_address_(0),
|
||||
high_address_(0),
|
||||
Module(runtime) {}
|
||||
high_address_(0) {}
|
||||
|
||||
RawModule::~RawModule() {
|
||||
if (base_address_) {
|
||||
|
||||
@@ -27,7 +27,7 @@ using alloy::backend::Backend;
|
||||
using alloy::frontend::Frontend;
|
||||
|
||||
Runtime::Runtime(Memory* memory)
|
||||
: memory_(memory), debugger_(0), backend_(0), frontend_(0) {
|
||||
: memory_(memory), debugger_(0), frontend_(0), backend_(0) {
|
||||
tracing::Initialize();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ namespace runtime {
|
||||
|
||||
SymbolInfo::SymbolInfo(Type type, Module* module, uint64_t address)
|
||||
: type_(type),
|
||||
status_(STATUS_DEFINING),
|
||||
module_(module),
|
||||
status_(STATUS_DEFINING),
|
||||
address_(address),
|
||||
name_(0) {}
|
||||
|
||||
@@ -33,10 +33,10 @@ void SymbolInfo::set_name(const char* name) {
|
||||
}
|
||||
|
||||
FunctionInfo::FunctionInfo(Module* module, uint64_t address)
|
||||
: end_address_(0),
|
||||
: SymbolInfo(SymbolInfo::TYPE_FUNCTION, module, address),
|
||||
end_address_(0),
|
||||
behavior_(BEHAVIOR_DEFAULT),
|
||||
function_(0),
|
||||
SymbolInfo(SymbolInfo::TYPE_FUNCTION, module, address) {
|
||||
function_(0) {
|
||||
xe_zero_struct(&extern_info_, sizeof(extern_info_));
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
namespace alloy {
|
||||
namespace runtime {
|
||||
|
||||
__declspec(thread) ThreadState* thread_state_ = NULL;
|
||||
thread_local ThreadState* thread_state_ = NULL;
|
||||
|
||||
ThreadState::ThreadState(Runtime* runtime, uint32_t thread_id)
|
||||
: runtime_(runtime),
|
||||
|
||||
Reference in New Issue
Block a user