Debugger stuff, and changing to vcproj's/sln.

This commit is contained in:
Ben Vanik
2015-05-09 17:48:12 -07:00
parent 4411a4499d
commit 7a00b76a6e
97 changed files with 4039 additions and 1643 deletions

View File

@@ -1,64 +0,0 @@
# Copyright 2014 Ben Vanik. All Rights Reserved.
{
'sources': [
'arena.cc',
'arena.h',
'assert.h',
'atomic.h',
'byte_order.h',
'debugging.h',
'delegate.h',
'fs.h',
'fs.cc',
'logging.cc',
'logging.h',
'main.h',
'mapped_memory.h',
'math.cc',
'math.h',
'memory_generic.cc',
'memory.h',
'platform.h',
'reset_scope.h',
'string.cc',
'string.h',
'string_buffer.cc',
'string_buffer.h',
'threading.cc',
'threading.h',
'type_pool.h',
'vec128.h',
],
'conditions': [
['OS == "mac" or OS == "linux"', {
'sources': [
'main_posix.cc',
'mapped_memory_posix.cc',
],
}],
['OS == "linux"', {
'sources': [
'threading_posix.cc',
],
}],
['OS == "mac"', {
'sources': [
'debugging_mac.cc',
'threading_mac.cc',
],
}],
['OS == "win"', {
'sources': [
'debugging_win.cc',
'fs_win.cc',
'main_win.cc',
'mapped_memory_win.cc',
'threading_win.cc',
],
}],
],
'includes': [
],
}

View File

@@ -47,17 +47,19 @@ void StringBuffer::AppendVarargs(const char* format, va_list args) {
int length = vsnprintf(nullptr, 0, format, args);
auto offset = buffer_.size();
Grow(length + 1);
buffer_.resize(buffer_.size() + length);
buffer_.resize(buffer_.size() + length + 1);
vsnprintf(buffer_.data() + offset, buffer_.capacity(), format, args);
buffer_[buffer_.size()] = 0;
buffer_[buffer_.size() - 1] = 0;
buffer_.resize(buffer_.size() - 1);
}
void StringBuffer::AppendBytes(const uint8_t* buffer, size_t length) {
auto offset = buffer_.size();
Grow(length + 1);
buffer_.resize(buffer_.size() + length);
buffer_.resize(buffer_.size() + length + 1);
memcpy(buffer_.data() + offset, buffer, length);
buffer_[buffer_.size()] = 0;
buffer_[buffer_.size() - 1] = 0;
buffer_.resize(buffer_.size() - 1);
}
const char* StringBuffer::GetString() const { return buffer_.data(); }

View File

@@ -1,18 +0,0 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2014 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "xenia/base/threading.h"
namespace xe {
namespace threading {
//
} // namespace threading
} // namespace xe