DBG: assembler script api
This commit is contained in:
parent
b2fc603cf6
commit
bb332f69b3
|
|
@ -0,0 +1,22 @@
|
|||
#include "_scriptapi_assembler.h"
|
||||
#include "assemble.h"
|
||||
|
||||
SCRIPT_EXPORT bool Script::Assembler::Assemble(duint addr, unsigned char* dest, int* size, const char* instruction)
|
||||
{
|
||||
return assemble(addr, dest, size, instruction, nullptr);
|
||||
}
|
||||
|
||||
SCRIPT_EXPORT bool Script::Assembler::AssembleEx(duint addr, unsigned char* dest, int* size, const char* instruction, char* error)
|
||||
{
|
||||
return assemble(addr, dest, size, instruction, error);
|
||||
}
|
||||
|
||||
SCRIPT_EXPORT bool Script::Assembler::AssembleMem(duint addr, const char* instruction)
|
||||
{
|
||||
return assembleat(addr, instruction, nullptr, nullptr, false);
|
||||
}
|
||||
|
||||
SCRIPT_EXPORT bool Script::Assembler::AssembleMemEx(duint addr, const char* instruction, int* size, char* error, bool fillnop)
|
||||
{
|
||||
return assembleat(addr, instruction, size, error, fillnop);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef _SCRIPTAPI_ASSEMBLER_H
|
||||
#define _SCRIPTAPI_ASSEMBLER_H
|
||||
|
||||
#include "_scriptapi.h"
|
||||
|
||||
namespace Script
|
||||
{
|
||||
namespace Assembler
|
||||
{
|
||||
SCRIPT_EXPORT bool Assemble(duint addr, unsigned char* dest, int* size, const char* instruction); //dest[16]
|
||||
SCRIPT_EXPORT bool AssembleEx(duint addr, unsigned char* dest, int* size, const char* instruction, char* error); //dest[16], error[MAX_ERROR_SIZE]
|
||||
SCRIPT_EXPORT bool AssembleMem(duint addr, const char* instruction);
|
||||
SCRIPT_EXPORT bool AssembleMemEx(duint addr, const char* instruction, int* size, char* error, bool fillnop); //error[MAX_ERROR_SIZE]
|
||||
}; //Assembler
|
||||
}; //Script
|
||||
|
||||
#endif //_SCRIPTAPI_ASSEMBLER_H
|
||||
|
|
@ -67,6 +67,7 @@
|
|||
<ClCompile Include="_dbgfunctions.cpp" />
|
||||
<ClCompile Include="_global.cpp" />
|
||||
<ClCompile Include="_plugins.cpp" />
|
||||
<ClCompile Include="_scriptapi_assembler.cpp" />
|
||||
<ClCompile Include="_scriptapi_debug.cpp" />
|
||||
<ClCompile Include="_scriptapi_gui.cpp" />
|
||||
<ClCompile Include="_scriptapi_pattern.cpp" />
|
||||
|
|
@ -177,6 +178,7 @@
|
|||
<ClInclude Include="_global.h" />
|
||||
<ClInclude Include="_plugins.h" />
|
||||
<ClInclude Include="_plugin_types.h" />
|
||||
<ClInclude Include="_scriptapi_assembler.h" />
|
||||
<ClInclude Include="_scriptapi_debug.h" />
|
||||
<ClInclude Include="_scriptapi_gui.h" />
|
||||
<ClInclude Include="_scriptapi_pattern.h" />
|
||||
|
|
|
|||
|
|
@ -249,6 +249,9 @@
|
|||
<ClCompile Include="analysis.cpp">
|
||||
<Filter>Source Files\Analysis</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="_scriptapi_assembler.cpp">
|
||||
<Filter>Source Files\Interfaces/Exports\_scriptapi</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="x64_dbg.h">
|
||||
|
|
@ -575,5 +578,8 @@
|
|||
<ClInclude Include="analysis.h">
|
||||
<Filter>Header Files\Analysis</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="_scriptapi_assembler.h">
|
||||
<Filter>Header Files\Interfaces/Exports\_scriptapi</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Loading…
Reference in New Issue