debugger class start

This commit is contained in:
Mr. eXoDia 2015-03-25 01:19:39 +01:00
parent b8157cbbda
commit 0d7d9a63ea
4 changed files with 66 additions and 0 deletions

6
GleeBug/Debugger.cpp Normal file
View File

@ -0,0 +1,6 @@
#include "Debugger.h"
namespace GleeBug
{
};

52
GleeBug/Debugger.h Normal file
View File

@ -0,0 +1,52 @@
#ifndef _DEBUGGER_H
#define _DEBUGGER_H
#include "_global.h"
namespace GleeBug
{
/**
\brief A debugger class.
*/
class Debugger
{
public:
/**
\brief Constructs the Debugger instance.
*/
Debugger();
/**
\brief Start the debuggee.
\param szFilePath Full pathname of the file to debug.
\param szCommandLine The command line to pass to the debuggee.
\param szCurrentDirectory Pathname of the current directory.
\return true if the debuggee was started correctly, false otherwise.
*/
bool Init(const wchar_t* szFilePath,
const wchar_t* szCommandLine,
const wchar_t* szCurrentDirectory);
/**
\brief Stops the debuggee (terminate the process)
\return true if the debuggee was stopped correctly, false otherwise.
*/
bool Stop();
/**
\brief Detaches the debuggee.
\return true if the debuggee was detached correctly, false otherwise.
*/
bool Detach();
/**
\brief Run the debug loop (does not return until the debuggee is detached or terminated).
*/
void Start();
private:
//state variables
};
};
#endif //_DEBUGGER_H

View File

@ -65,12 +65,14 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="Debugger.Core.cpp" /> <ClCompile Include="Debugger.Core.cpp" />
<ClCompile Include="Debugger.cpp" />
<ClCompile Include="Debugger.Loop.cpp" /> <ClCompile Include="Debugger.Loop.cpp" />
<ClCompile Include="main.cpp" /> <ClCompile Include="main.cpp" />
<ClCompile Include="_global.cpp" /> <ClCompile Include="_global.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="Debugger.Core.h" /> <ClInclude Include="Debugger.Core.h" />
<ClInclude Include="Debugger.h" />
<ClInclude Include="Debugger.Loop.h" /> <ClInclude Include="Debugger.Loop.h" />
<ClInclude Include="Debugger.State.h" /> <ClInclude Include="Debugger.State.h" />
<ClInclude Include="_global.h" /> <ClInclude Include="_global.h" />

View File

@ -27,6 +27,9 @@
<ClCompile Include="Debugger.Loop.cpp"> <ClCompile Include="Debugger.Loop.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Debugger.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="Debugger.Core.h"> <ClInclude Include="Debugger.Core.h">
@ -41,5 +44,8 @@
<ClInclude Include="Debugger.Loop.h"> <ClInclude Include="Debugger.Loop.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="Debugger.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
</Project> </Project>