From 0d7d9a63ea9d1508117515cc9952c5344623f859 Mon Sep 17 00:00:00 2001 From: "Mr. eXoDia" Date: Wed, 25 Mar 2015 01:19:39 +0100 Subject: [PATCH] debugger class start --- GleeBug/Debugger.cpp | 6 ++++ GleeBug/Debugger.h | 52 +++++++++++++++++++++++++++++++++ GleeBug/GleeBug.vcxproj | 2 ++ GleeBug/GleeBug.vcxproj.filters | 6 ++++ 4 files changed, 66 insertions(+) create mode 100644 GleeBug/Debugger.cpp create mode 100644 GleeBug/Debugger.h diff --git a/GleeBug/Debugger.cpp b/GleeBug/Debugger.cpp new file mode 100644 index 0000000..c4e575d --- /dev/null +++ b/GleeBug/Debugger.cpp @@ -0,0 +1,6 @@ +#include "Debugger.h" + +namespace GleeBug +{ + +}; \ No newline at end of file diff --git a/GleeBug/Debugger.h b/GleeBug/Debugger.h new file mode 100644 index 0000000..12f539b --- /dev/null +++ b/GleeBug/Debugger.h @@ -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 \ No newline at end of file diff --git a/GleeBug/GleeBug.vcxproj b/GleeBug/GleeBug.vcxproj index b0865ff..f2201fd 100644 --- a/GleeBug/GleeBug.vcxproj +++ b/GleeBug/GleeBug.vcxproj @@ -65,12 +65,14 @@ + + diff --git a/GleeBug/GleeBug.vcxproj.filters b/GleeBug/GleeBug.vcxproj.filters index f86752c..44fcc73 100644 --- a/GleeBug/GleeBug.vcxproj.filters +++ b/GleeBug/GleeBug.vcxproj.filters @@ -27,6 +27,9 @@ Source Files + + Source Files + @@ -41,5 +44,8 @@ Header Files + + Header Files + \ No newline at end of file