1
0
Fork 0

DBG: include refactor

This commit is contained in:
mrexodia 2017-04-29 19:45:34 +02:00
parent 906cbb74cf
commit 771103c27a
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
34 changed files with 49 additions and 27 deletions

View File

@ -2,6 +2,7 @@
#define TRACERECORD_H
#include "_global.h"
#include "_dbgfunctions.h"
#include "jansson/jansson_x64dbg.h"
class TraceRecordManager
{

View File

@ -34,6 +34,7 @@
#include "animate.h"
#include "TraceRecord.h"
#include "recursiveanalysis.h"
#include "dbghelp_safe.h"
static bool bOnlyCipAutoComments = false;
static bool bNoSourceLineAutoComments = false;

View File

@ -6,6 +6,8 @@
#include "_global.h"
#include <objbase.h>
#include <shlobj.h>
#include <psapi.h>
#include "DeviceNameResolver/DeviceNameResolver.h"
/**
\brief x64dbg library instance.

View File

@ -1,5 +1,4 @@
#ifndef _GLOBAL_H
#define _GLOBAL_H
#pragma once
#define _WIN32_WINNT 0x0501
@ -10,30 +9,10 @@
#define _WIN32_IE 0x0500
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <windows.h>
#include <psapi.h>
#include <shlwapi.h>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <functional>
#include <unordered_map>
#include <unordered_set>
#include <tlhelp32.h>
#include "../dbg_types.h"
#include "../dbg_assert.h"
#include "../bridge\bridgemain.h"
#include "jansson/jansson.h"
#include "jansson/jansson_x64dbg.h"
#include "DeviceNameResolver/DeviceNameResolver.h"
#include "handle.h"
#include "../bridge/bridgemain.h"
#include "stringutils.h"
#include "dbghelp_safe.h"
#ifndef DLL_EXPORT
#define DLL_EXPORT __declspec(dllexport)
@ -98,5 +77,3 @@ void WaitForMultipleThreadsTermination(const HANDLE* hThread, int count, DWORD t
#endif //_WIN64
#include "dynamicmem.h"
#endif // _GLOBAL_H

View File

@ -4,6 +4,8 @@
#ifdef BUILD_DBG
#include "_global.h"
#include "jansson/jansson.h"
#include <dbghelp.h>
#else

View File

@ -3,6 +3,8 @@
#include "_global.h"
#include <functional>
#include <map>
#include <unordered_map>
//ranges
typedef std::pair<duint, duint> Range;

View File

@ -2,6 +2,7 @@
#include "console.h"
#include "memory.h"
#include "function.h"
#include <algorithm>
LinearAnalysis::LinearAnalysis(duint base, duint size) : Analysis(base, size)
{

View File

@ -2,6 +2,7 @@
#define _BREAKPOINT_H
#include "_global.h"
#include "jansson/jansson_x64dbg.h"
#define TITANSETDRX(titantype, drx) titantype &= 0x0FF; titantype |= (drx<<8)
#define TITANGETDRX(titantype) (titantype >> 8) & 0xF

View File

@ -3,6 +3,7 @@
#include "_global.h"
#include "command.h"
#include "jansson/jansson_x64dbg.h"
typedef enum
{

View File

@ -14,6 +14,7 @@
#include "symbolinfo.h"
#include "exception.h"
#include "TraceRecord.h"
#include "dbghelp_safe.h"
bool cbInstrAnalyse(int argc, char* argv[])
{

View File

@ -4,6 +4,7 @@
#include "console.h"
#include "variable.h"
#include "value.h"
#include <functional>
static bool cbDebugSetBPXTextCommon(BP_TYPE Type, int argc, char* argv[], const String & description, const std::function<bool(duint, BP_TYPE, const char*)> & setFunction)
{

View File

@ -9,6 +9,7 @@
#include "plugin_loader.h"
#include "value.h"
#include "TraceRecord.h"
#include "handle.h"
static bool skipInt3Stepping(int argc, char* argv[])
{

View File

@ -3,6 +3,7 @@
#include "stringutils.h"
#include "value.h"
#include <capstone_wrapper.h>
#include <algorithm>
std::unordered_map<ENCODETYPE, std::string> disasmMap;
std::unordered_map<std::string, ENCODETYPE> assembleMap;

View File

@ -31,6 +31,9 @@
#include "cmd-watch-control.h"
#include "filemap.h"
#include "jit.h"
#include "handle.h"
#include "dbghelp_safe.h"
/**
\brief Conditional tracing structures
*/

View File

@ -7,6 +7,8 @@
#include "breakpoint.h"
#include "_plugins.h"
#include "commandline.h"
#include <tlhelp32.h>
#include <psapi.h>
//structures
struct INIT_STRUCT

View File

@ -1,5 +1,7 @@
#pragma once
#include "_global.h"
#include "jansson/jansson_x64dbg.h"
void* EncodeMapGetBuffer(duint addr, duint* size, bool create = false);
void EncodeMapReleaseBuffer(void* buffer);

View File

@ -1,4 +1,5 @@
#include <unordered_map>
#include <algorithm>
#include "exception.h"
#include "filehelper.h"
#include "value.h"

View File

@ -1,6 +1,7 @@
#pragma once
#include "_global.h"
#include <functional>
class ExpressionFunctions
{

View File

@ -2,6 +2,7 @@
#include "_global.h"
#include "_plugins.h"
#include <functional>
class FormatFunctions
{

View File

@ -2,6 +2,7 @@
#include "undocumented.h"
#include "exception.h"
#include "debugger.h"
#include <functional>
typedef struct _OBJECT_NAME_INFORMATION
{

View File

@ -6,6 +6,7 @@
#include "threading.h"
#include "cmd-watch-control.h"
#include "debugger.h"
#include <deque>
static const duint HistoryMaxCount = 4096;
static std::deque<HistoryContext> history;

View File

@ -1,3 +1,7 @@
#pragma once
#include "jansson.h"
typedef json_t* JSON;
static JSON_INLINE

View File

@ -1,5 +1,6 @@
#include "mnemonichelp.h"
#include "threading.h"
#include "jansson/jansson_x64dbg.h"
static std::unordered_map<String, String> MnemonicMap;
static std::unordered_map<String, String> MnemonicBriefMap;

View File

@ -5,6 +5,7 @@
#include "murmurhash.h"
#include "memory.h"
#include "label.h"
#include <algorithm>
std::map<Range, MODINFO, RangeCompare> modinfo;
std::unordered_map<duint, std::string> hashNameMap;

View File

@ -10,6 +10,8 @@
#include "threading.h"
#include "expressionfunctions.h"
#include "formatfunctions.h"
#include <algorithm>
#include <shlwapi.h>
/**
\brief List of plugins.

View File

@ -5,6 +5,7 @@
#include "threading.h"
#include "module.h"
#include "memory.h"
#include "jansson/jansson_x64dbg.h"
template<class TValue>
class JSONWrapper
@ -300,7 +301,7 @@ struct SerializableModuleHashMap : SerializableUnorderedMap<TLock, duint, TValue
return ModHashFromAddr(addr);
}
void DeleteRangeWhere(duint start, duint end, std::function<bool(duint start, duint end, const TValue & value)> inRange)
void DeleteRangeWhere(duint start, duint end, std::function<bool(duint, duint, const TValue &)> inRange)
{
// Are all comments going to be deleted?
// 0x00000000 - 0xFFFFFFFF

View File

@ -15,6 +15,7 @@
#include "exhandlerinfo.h"
#include "symbolinfo.h"
#include "debugger.h"
#include "dbghelp_safe.h"
using SehMap = std::unordered_map<duint, STACK_COMMENT>;
static SehMap SehCache;

View File

@ -9,6 +9,7 @@
#include "console.h"
#include "module.h"
#include "addrinfo.h"
#include "dbghelp_safe.h"
struct SYMBOLCBDATA
{

View File

@ -3,6 +3,8 @@
#include "threading.h"
#include "filehelper.h"
#include "console.h"
#include "jansson/jansson_x64dbg.h"
#include <algorithm>
using namespace Types;

View File

@ -1910,7 +1910,7 @@ static bool longEnough(const char* str, size_t min_length)
static bool startsWith(const char* pre, const char* str)
{
size_t lenpre = strlen(pre);
return longEnough(str, lenpre) ? StrNCmpI(str, pre, (int) lenpre) == 0 : false;
return longEnough(str, lenpre) ? _strnicmp(str, pre, (int) lenpre) == 0 : false;
}
#define MxCsr_PRE_FIELD_STRING "MxCsr_"

View File

@ -6,6 +6,7 @@
#include "variable.h"
#include "threading.h"
#include <map>
/**
\brief The container that stores all variables.

View File

@ -1,7 +1,9 @@
#pragma once
#include "_global.h"
#include "jansson/jansson_x64dbg.h"
#include "expressionparser.h"
#include <map>
class WatchExpr
{

View File

@ -26,6 +26,7 @@
#include "expressionfunctions.h"
#include "formatfunctions.h"
#include "yara/yara.h"
#include "dbghelp_safe.h"
static MESSAGE_STACK* gMsgStack = 0;
static HANDLE hCommandLoopThread = 0;

View File

@ -2,6 +2,7 @@
#define _XREFS_H
#include "_global.h"
#include "jansson/jansson_x64dbg.h"
bool XrefAdd(duint Address, duint From);
bool XrefGet(duint Address, XREF_INFO* List);