Common: asterisks go against the type name
not the variable name
This commit is contained in:
parent
7c3e4b34f3
commit
78aa398e7c
|
@ -60,7 +60,7 @@ bool IsImmArithmetic(uint64_t input, u32 *val, bool *shift)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsImmLogical(uint64_t value, unsigned int width, unsigned int *n, unsigned int *imm_s, unsigned int *imm_r)
|
bool IsImmLogical(uint64_t value, unsigned int width, unsigned int* n, unsigned int* imm_s, unsigned int* imm_r)
|
||||||
{
|
{
|
||||||
//DCHECK((n != NULL) && (imm_s != NULL) && (imm_r != NULL));
|
//DCHECK((n != NULL) && (imm_s != NULL) && (imm_r != NULL));
|
||||||
// DCHECK((width == kWRegSizeInBits) || (width == kXRegSizeInBits));
|
// DCHECK((width == kWRegSizeInBits) || (width == kXRegSizeInBits));
|
||||||
|
|
|
@ -96,7 +96,7 @@ constexpr ARM64Reg EncodeRegToDouble(ARM64Reg reg) { return static_cast<ARM64Reg
|
||||||
constexpr ARM64Reg EncodeRegToQuad(ARM64Reg reg) { return static_cast<ARM64Reg>(reg | 0xC0); }
|
constexpr ARM64Reg EncodeRegToQuad(ARM64Reg reg) { return static_cast<ARM64Reg>(reg | 0xC0); }
|
||||||
|
|
||||||
// For AND/TST/ORR/EOR etc
|
// For AND/TST/ORR/EOR etc
|
||||||
bool IsImmLogical(uint64_t value, unsigned int width, unsigned int *n, unsigned int *imm_s, unsigned int *imm_r);
|
bool IsImmLogical(uint64_t value, unsigned int width, unsigned int* n, unsigned int* imm_s, unsigned int* imm_r);
|
||||||
// For ADD/SUB
|
// For ADD/SUB
|
||||||
bool IsImmArithmetic(uint64_t input, u32 *val, bool *shift);
|
bool IsImmArithmetic(uint64_t input, u32 *val, bool *shift);
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ std::vector<std::string> cdio_get_devices()
|
||||||
// checklist: /dev/cdrom, /dev/dvd /dev/hd?, /dev/scd? /dev/sr?
|
// checklist: /dev/cdrom, /dev/dvd /dev/hd?, /dev/scd? /dev/sr?
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
const char * format;
|
const char* format;
|
||||||
unsigned int num_min;
|
unsigned int num_min;
|
||||||
unsigned int num_max;
|
unsigned int num_max;
|
||||||
} checklist[] =
|
} checklist[] =
|
||||||
|
@ -166,7 +166,7 @@ static bool is_device(const std::string& source_name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check a device to see if it is a DVD/CD-ROM drive
|
// Check a device to see if it is a DVD/CD-ROM drive
|
||||||
static bool is_cdrom(const std::string& drive, char *mnttype)
|
static bool is_cdrom(const std::string& drive, char* mnttype)
|
||||||
{
|
{
|
||||||
// Check if the device exists
|
// Check if the device exists
|
||||||
if (!is_device(drive))
|
if (!is_device(drive))
|
||||||
|
@ -213,7 +213,7 @@ bool cdio_is_cdrom(std::string device)
|
||||||
// Resolve symbolic links. This allows symbolic links to valid
|
// Resolve symbolic links. This allows symbolic links to valid
|
||||||
// drives to be passed from the command line with the -e flag.
|
// drives to be passed from the command line with the -e flag.
|
||||||
char resolved_path[MAX_PATH];
|
char resolved_path[MAX_PATH];
|
||||||
char *devname = realpath(device.c_str(), resolved_path);
|
char* devname = realpath(device.c_str(), resolved_path);
|
||||||
if (!devname)
|
if (!devname)
|
||||||
return false;
|
return false;
|
||||||
device = devname;
|
device = devname;
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
// Git version number
|
// Git version number
|
||||||
extern const char *scm_desc_str;
|
extern const char* scm_desc_str;
|
||||||
extern const char *scm_branch_str;
|
extern const char* scm_branch_str;
|
||||||
extern const char *scm_rev_str;
|
extern const char* scm_rev_str;
|
||||||
extern const char *scm_rev_git_str;
|
extern const char* scm_rev_git_str;
|
||||||
extern const char *netplay_dolphin_ver;
|
extern const char* netplay_dolphin_ver;
|
||||||
|
|
||||||
// Force enable logging in the right modes. For some reason, something had changed
|
// Force enable logging in the right modes. For some reason, something had changed
|
||||||
// so that debugfast no longer logged.
|
// so that debugfast no longer logged.
|
||||||
|
|
|
@ -14,7 +14,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual std::string Disassemble(unsigned int /*address*/) { return "NODEBUGGER"; }
|
virtual std::string Disassemble(unsigned int /*address*/) { return "NODEBUGGER"; }
|
||||||
virtual void GetRawMemoryString(int /*memory*/, unsigned int /*address*/, char *dest, int /*max_size*/) {strcpy(dest, "NODEBUGGER");}
|
virtual void GetRawMemoryString(int /*memory*/, unsigned int /*address*/, char* dest, int /*max_size*/) {strcpy(dest, "NODEBUGGER");}
|
||||||
virtual int GetInstructionSize(int /*instruction*/) {return 1;}
|
virtual int GetInstructionSize(int /*instruction*/) {return 1;}
|
||||||
virtual bool IsAlive() {return true;}
|
virtual bool IsAlive() {return true;}
|
||||||
virtual bool IsBreakpoint(unsigned int /*address*/) {return false;}
|
virtual bool IsBreakpoint(unsigned int /*address*/) {return false;}
|
||||||
|
|
|
@ -271,7 +271,7 @@ bool Rename(const std::string &srcFilename, const std::string &destFilename)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
static void FSyncPath(const char *path)
|
static void FSyncPath(const char* path)
|
||||||
{
|
{
|
||||||
int fd = open(path, O_RDONLY);
|
int fd = open(path, O_RDONLY);
|
||||||
if (fd != -1)
|
if (fd != -1)
|
||||||
|
@ -294,7 +294,7 @@ bool RenameSync(const std::string &srcFilename, const std::string &destFilename)
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
char *path = strdup(srcFilename.c_str());
|
char* path = strdup(srcFilename.c_str());
|
||||||
FSyncPath(path);
|
FSyncPath(path);
|
||||||
FSyncPath(dirname(path));
|
FSyncPath(dirname(path));
|
||||||
free(path);
|
free(path);
|
||||||
|
@ -652,7 +652,7 @@ void CopyDir(const std::string &source_path, const std::string &dest_path)
|
||||||
// Returns the current directory
|
// Returns the current directory
|
||||||
std::string GetCurrentDir()
|
std::string GetCurrentDir()
|
||||||
{
|
{
|
||||||
char *dir;
|
char* dir;
|
||||||
// Get the current working directory (getcwd uses malloc)
|
// Get the current working directory (getcwd uses malloc)
|
||||||
if (!(dir = __getcwd(nullptr, 0)))
|
if (!(dir = __getcwd(nullptr, 0)))
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,7 +12,7 @@ public:
|
||||||
ConsoleListener();
|
ConsoleListener();
|
||||||
~ConsoleListener();
|
~ConsoleListener();
|
||||||
|
|
||||||
void Log(LogTypes::LOG_LEVELS, const char *text) override;
|
void Log(LogTypes::LOG_LEVELS, const char* text) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool m_use_color;
|
bool m_use_color;
|
||||||
|
|
|
@ -14,7 +14,7 @@ ConsoleListener::~ConsoleListener()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char *text)
|
void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char* text)
|
||||||
{
|
{
|
||||||
android_LogPriority logLevel = ANDROID_LOG_UNKNOWN;
|
android_LogPriority logLevel = ANDROID_LOG_UNKNOWN;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ ConsoleListener::~ConsoleListener()
|
||||||
fflush(nullptr);
|
fflush(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char *text)
|
void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char* text)
|
||||||
{
|
{
|
||||||
char color_attr[16] = "";
|
char color_attr[16] = "";
|
||||||
char reset_attr[16] = "";
|
char reset_attr[16] = "";
|
||||||
|
|
|
@ -14,7 +14,7 @@ ConsoleListener::~ConsoleListener()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char *text)
|
void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char* text)
|
||||||
{
|
{
|
||||||
::OutputDebugStringA(text);
|
::OutputDebugStringA(text);
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,7 @@ static const char LOG_LEVEL_TO_CHAR[7] = "-NEWID";
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||||
const char *file, int line, const char *fmt, ...)
|
const char* file, int line, const char* fmt, ...)
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__attribute__((format(printf, 5, 6)))
|
__attribute__((format(printf, 5, 6)))
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "Common/Logging/LogManager.h"
|
#include "Common/Logging/LogManager.h"
|
||||||
|
|
||||||
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||||
const char *file, int line, const char* fmt, ...)
|
const char* file, int line, const char* fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
|
@ -115,7 +115,7 @@ LogManager::~LogManager()
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||||
const char *file, int line, const char *format, va_list args)
|
const char* file, int line, const char* format, va_list args)
|
||||||
{
|
{
|
||||||
char temp[MAX_MSGLEN];
|
char temp[MAX_MSGLEN];
|
||||||
LogContainer *log = m_Log[type];
|
LogContainer *log = m_Log[type];
|
||||||
|
@ -160,7 +160,7 @@ FileLogListener::FileLogListener(const std::string& filename)
|
||||||
SetEnable(true);
|
SetEnable(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileLogListener::Log(LogTypes::LOG_LEVELS, const char *msg)
|
void FileLogListener::Log(LogTypes::LOG_LEVELS, const char* msg)
|
||||||
{
|
{
|
||||||
if (!IsEnabled() || !IsValid())
|
if (!IsEnabled() || !IsValid())
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -24,7 +24,7 @@ class LogListener
|
||||||
public:
|
public:
|
||||||
virtual ~LogListener() {}
|
virtual ~LogListener() {}
|
||||||
|
|
||||||
virtual void Log(LogTypes::LOG_LEVELS, const char *msg) = 0;
|
virtual void Log(LogTypes::LOG_LEVELS, const char* msg) = 0;
|
||||||
|
|
||||||
enum LISTENER
|
enum LISTENER
|
||||||
{
|
{
|
||||||
|
@ -41,7 +41,7 @@ class FileLogListener : public LogListener
|
||||||
public:
|
public:
|
||||||
FileLogListener(const std::string& filename);
|
FileLogListener(const std::string& filename);
|
||||||
|
|
||||||
void Log(LogTypes::LOG_LEVELS, const char *msg) override;
|
void Log(LogTypes::LOG_LEVELS, const char* msg) override;
|
||||||
|
|
||||||
bool IsValid() const { return m_logfile.good(); }
|
bool IsValid() const { return m_logfile.good(); }
|
||||||
bool IsEnabled() const { return m_enable; }
|
bool IsEnabled() const { return m_enable; }
|
||||||
|
@ -66,7 +66,7 @@ public:
|
||||||
void AddListener(LogListener::LISTENER id) { m_listener_ids[id] = 1; }
|
void AddListener(LogListener::LISTENER id) { m_listener_ids[id] = 1; }
|
||||||
void RemoveListener(LogListener::LISTENER id) { m_listener_ids[id] = 0; }
|
void RemoveListener(LogListener::LISTENER id) { m_listener_ids[id] = 0; }
|
||||||
|
|
||||||
void Trigger(LogTypes::LOG_LEVELS, const char *msg);
|
void Trigger(LogTypes::LOG_LEVELS, const char* msg);
|
||||||
|
|
||||||
bool IsEnabled() const { return m_enable; }
|
bool IsEnabled() const { return m_enable; }
|
||||||
void SetEnable(bool enable) { m_enable = enable; }
|
void SetEnable(bool enable) { m_enable = enable; }
|
||||||
|
@ -105,7 +105,7 @@ public:
|
||||||
static u32 GetMaxLevel() { return MAX_LOGLEVEL; }
|
static u32 GetMaxLevel() { return MAX_LOGLEVEL; }
|
||||||
|
|
||||||
void Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
void Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||||
const char *file, int line, const char *fmt, va_list args);
|
const char* file, int line, const char* fmt, va_list args);
|
||||||
|
|
||||||
void SetLogLevel(LogTypes::LOG_TYPE type, LogTypes::LOG_LEVELS level)
|
void SetLogLevel(LogTypes::LOG_TYPE type, LogTypes::LOG_LEVELS level)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
#define ASHMEM_DEVICE "/dev/ashmem"
|
#define ASHMEM_DEVICE "/dev/ashmem"
|
||||||
|
|
||||||
static int AshmemCreateFileMapping(const char *name, size_t size)
|
static int AshmemCreateFileMapping(const char* name, size_t size)
|
||||||
{
|
{
|
||||||
int fd, ret;
|
int fd, ret;
|
||||||
fd = open(ASHMEM_DEVICE, O_RDWR);
|
fd = open(ASHMEM_DEVICE, O_RDWR);
|
||||||
|
|
|
@ -45,7 +45,7 @@ void* AllocateExecutableMemory(size_t size, bool low)
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
|
void* ptr = VirtualAlloc(0, size, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
|
||||||
#else
|
#else
|
||||||
static char *map_hint = nullptr;
|
static char* map_hint = nullptr;
|
||||||
#if defined(_M_X86_64) && !defined(MAP_32BIT)
|
#if defined(_M_X86_64) && !defined(MAP_32BIT)
|
||||||
// This OS has no flag to enforce allocation below the 4 GB boundary,
|
// This OS has no flag to enforce allocation below the 4 GB boundary,
|
||||||
// but if we hint that we want a low address it is very likely we will
|
// but if we hint that we want a low address it is very likely we will
|
||||||
|
|
|
@ -42,7 +42,7 @@ bool AsciiToHex(const std::string& _szValue, u32& result)
|
||||||
// Set errno to a good state.
|
// Set errno to a good state.
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|
||||||
char *endptr = nullptr;
|
char* endptr = nullptr;
|
||||||
const u32 value = strtoul(_szValue.c_str(), &endptr, 16);
|
const u32 value = strtoul(_szValue.c_str(), &endptr, 16);
|
||||||
|
|
||||||
if (!endptr || *endptr)
|
if (!endptr || *endptr)
|
||||||
|
@ -120,7 +120,7 @@ std::string StringFromFormat(const char* format, ...)
|
||||||
|
|
||||||
std::string StringFromFormatV(const char* format, va_list args)
|
std::string StringFromFormatV(const char* format, va_list args)
|
||||||
{
|
{
|
||||||
char *buf = nullptr;
|
char* buf = nullptr;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
int required = _vscprintf(format, args);
|
int required = _vscprintf(format, args);
|
||||||
buf = new char[required + 1];
|
buf = new char[required + 1];
|
||||||
|
@ -190,7 +190,7 @@ std::string StripQuotes(const std::string& s)
|
||||||
|
|
||||||
bool TryParse(const std::string &str, u32 *const output)
|
bool TryParse(const std::string &str, u32 *const output)
|
||||||
{
|
{
|
||||||
char *endptr = nullptr;
|
char* endptr = nullptr;
|
||||||
|
|
||||||
// Reset errno to a value other than ERANGE
|
// Reset errno to a value other than ERANGE
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|
|
@ -23,7 +23,7 @@ void SymbolDB::List()
|
||||||
INFO_LOG(OSHLE, "%zu functions known in this program above.", functions.size());
|
INFO_LOG(OSHLE, "%zu functions known in this program above.", functions.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SymbolDB::Clear(const char *prefix)
|
void SymbolDB::Clear(const char* prefix)
|
||||||
{
|
{
|
||||||
// TODO: honor prefix
|
// TODO: honor prefix
|
||||||
functions.clear();
|
functions.clear();
|
||||||
|
|
|
@ -97,7 +97,7 @@ public:
|
||||||
const XFuncMap &Symbols() const { return functions; }
|
const XFuncMap &Symbols() const { return functions; }
|
||||||
XFuncMap &AccessSymbols() { return functions; }
|
XFuncMap &AccessSymbols() { return functions; }
|
||||||
|
|
||||||
void Clear(const char *prefix = "");
|
void Clear(const char* prefix = "");
|
||||||
void List();
|
void List();
|
||||||
void Index();
|
void Index();
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,6 +35,6 @@ inline void YieldCPU()
|
||||||
std::this_thread::yield();
|
std::this_thread::yield();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCurrentThreadName(const char *name);
|
void SetCurrentThreadName(const char* name);
|
||||||
|
|
||||||
} // namespace Common
|
} // namespace Common
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#define BUILD_TYPE_STR ""
|
#define BUILD_TYPE_STR ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *scm_rev_str = "Dolphin "
|
const char* scm_rev_str = "Dolphin "
|
||||||
#if !SCM_IS_MASTER
|
#if !SCM_IS_MASTER
|
||||||
"[" SCM_BRANCH_STR "] "
|
"[" SCM_BRANCH_STR "] "
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,14 +25,14 @@ const char *scm_rev_str = "Dolphin "
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
const char *netplay_dolphin_ver = SCM_DESC_STR " Win";
|
const char* netplay_dolphin_ver = SCM_DESC_STR " Win";
|
||||||
#elif __APPLE__
|
#elif __APPLE__
|
||||||
const char *netplay_dolphin_ver = SCM_DESC_STR " Mac";
|
const char* netplay_dolphin_ver = SCM_DESC_STR " Mac";
|
||||||
#else
|
#else
|
||||||
const char *netplay_dolphin_ver = SCM_DESC_STR " Lin";
|
const char* netplay_dolphin_ver = SCM_DESC_STR " Lin";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *scm_rev_git_str = SCM_REV_STR;
|
const char* scm_rev_git_str = SCM_REV_STR;
|
||||||
|
|
||||||
const char *scm_desc_str = SCM_DESC_STR;
|
const char* scm_desc_str = SCM_DESC_STR;
|
||||||
const char *scm_branch_str = SCM_BRANCH_STR;
|
const char* scm_branch_str = SCM_BRANCH_STR;
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
|
|
||||||
#include "Common/x64Analyzer.h"
|
#include "Common/x64Analyzer.h"
|
||||||
|
|
||||||
bool DisassembleMov(const unsigned char *codePtr, InstructionInfo *info)
|
bool DisassembleMov(const unsigned char* codePtr, InstructionInfo *info)
|
||||||
{
|
{
|
||||||
unsigned const char *startCodePtr = codePtr;
|
unsigned const char* startCodePtr = codePtr;
|
||||||
u8 rex = 0;
|
u8 rex = 0;
|
||||||
u32 opcode;
|
u32 opcode;
|
||||||
int opcode_length;
|
int opcode_length;
|
||||||
|
|
|
@ -41,4 +41,4 @@ enum AccessType
|
||||||
OP_ACCESS_WRITE = 1
|
OP_ACCESS_WRITE = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
bool DisassembleMov(const unsigned char *codePtr, InstructionInfo *info);
|
bool DisassembleMov(const unsigned char* codePtr, InstructionInfo *info);
|
||||||
|
|
Loading…
Reference in New Issue