#include <DebuggingServer.h>
|
bool | GetWebArgs (struct mg_connection *conn, const struct mg_request_info *request_info, std::string argName, uint &arg) |
| Webserver helper function (can be called by multiple mongooser threads) More...
|
|
bool | GetWebArgs (struct mg_connection *conn, const struct mg_request_info *request_info, std::string argName, std::string &arg) |
|
void | GetThreadDebuggerStatus (std::stringstream &response) |
| Functions that are made available via http (can be called by multiple mongoose threads) More...
|
|
void | ToggleBreakPoint (std::string filename, uint line) |
|
void | GetAllCallstacks (std::stringstream &response) |
|
void | GetStackFrameData (std::stringstream &response, uint nestingLevel, uint threadDebuggerID, STACK_INFO stackInfoKind) |
|
bool | SetNextDbgCmd (uint threadDebuggerID, DBGCMD dbgCmd) |
|
void | SetSettingSimultaneousThreadBreak (bool Enabled) |
|
void | SetSettingBreakOnException (bool Enabled) |
|
void | EnumVfsJSFiles (std::stringstream &response) |
| Returns a list of the full vfs paths to all files with the extension .js found in the vfs root. More...
|
|
void | GetFile (std::string filename, std::stringstream &response) |
| Get the content of a .js file loaded into vfs. More...
|
|
void | EnableHTTP () |
| Not important for this class' thread-safety. More...
|
|
Definition at line 32 of file DebuggingServer.h.
CDebuggingServer::CDebuggingServer |
( |
| ) |
|
CDebuggingServer::~CDebuggingServer |
( |
| ) |
|
double CDebuggingServer::AquireBreakPointAccess |
( |
std::list< CBreakPoint > ** |
breakPoints | ) |
|
Aquire exclusive read and write access to the list of breakpoints.
- Parameters
-
breakPoints | A pointer to the list storing all breakpoints. |
- Returns
- A number you need to pass to ReleaseBreakPointAccess().
Make sure to call ReleaseBreakPointAccess after you don't need access any longer. Using this function you get exclusive access and other threads won't be able to access the breakpoints until you call ReleaseBreakPointAccess!
Definition at line 556 of file DebuggingServer.cpp.
void CDebuggingServer::EnableHTTP |
( |
| ) |
|
|
private |
void CDebuggingServer::EnumVfsJSFiles |
( |
std::stringstream & |
response | ) |
|
|
private |
Returns a list of the full vfs paths to all files with the extension .js found in the vfs root.
- Parameters
-
response | This will contain the list as JSON array. |
Definition at line 185 of file DebuggingServer.cpp.
void CDebuggingServer::GetAllCallstacks |
( |
std::stringstream & |
response | ) |
|
|
private |
bool CDebuggingServer::GetBreakRequestedByThread |
( |
| ) |
|
bool CDebuggingServer::GetBreakRequestedByUser |
( |
| ) |
|
void CDebuggingServer::GetFile |
( |
std::string |
filename, |
|
|
std::stringstream & |
response |
|
) |
| |
|
private |
Get the content of a .js file loaded into vfs.
- Parameters
-
filename | A full vfs path (as returned by EnumVfsJSFiles). |
response | This will contain the contents of the requested file. |
Definition at line 205 of file DebuggingServer.cpp.
bool CDebuggingServer::GetSettingBreakOnException |
( |
| ) |
|
bool CDebuggingServer::GetSettingSimultaneousThreadBreak |
( |
| ) |
|
void CDebuggingServer::GetStackFrameData |
( |
std::stringstream & |
response, |
|
|
uint |
nestingLevel, |
|
|
uint |
threadDebuggerID, |
|
|
STACK_INFO |
stackInfoKind |
|
) |
| |
|
private |
void CDebuggingServer::GetThreadDebuggerStatus |
( |
std::stringstream & |
response | ) |
|
|
private |
Functions that are made available via http (can be called by multiple mongoose threads)
Definition at line 490 of file DebuggingServer.cpp.
bool CDebuggingServer::GetWebArgs |
( |
struct mg_connection * |
conn, |
|
|
const struct mg_request_info * |
request_info, |
|
|
std::string |
argName, |
|
|
uint & |
arg |
|
) |
| |
|
private |
Webserver helper function (can be called by multiple mongooser threads)
Definition at line 426 of file DebuggingServer.cpp.
bool CDebuggingServer::GetWebArgs |
( |
struct mg_connection * |
conn, |
|
|
const struct mg_request_info * |
request_info, |
|
|
std::string |
argName, |
|
|
std::string & |
arg |
|
) |
| |
|
private |
void CDebuggingServer::RegisterScriptinterface |
( |
std::string |
name, |
|
|
ScriptInterface * |
pScriptInterface |
|
) |
| |
Register a new ScriptInerface for debugging the scripts it executes.
- Parameters
-
name | A name for the ScriptInterface (will be sent to the debugging client an probably displayed to the user) |
pScriptInterface | A pointer to the ScriptInterface. This pointer must stay valid until UnRegisterScriptInterface ist called! |
Definition at line 465 of file DebuggingServer.cpp.
void CDebuggingServer::ReleaseBreakPointAccess |
( |
double |
breakPointsLockID | ) |
|
void CDebuggingServer::SetBreakRequestedByThread |
( |
bool |
Enabled | ) |
|
void CDebuggingServer::SetBreakRequestedByUser |
( |
bool |
Enabled | ) |
|
bool CDebuggingServer::SetNextDbgCmd |
( |
uint |
threadDebuggerID, |
|
|
DBGCMD |
dbgCmd |
|
) |
| |
|
private |
void CDebuggingServer::SetSettingBreakOnException |
( |
bool |
Enabled | ) |
|
|
private |
void CDebuggingServer::SetSettingSimultaneousThreadBreak |
( |
bool |
Enabled | ) |
|
|
private |
void CDebuggingServer::ToggleBreakPoint |
( |
std::string |
filename, |
|
|
uint |
line |
|
) |
| |
|
private |
void CDebuggingServer::UnRegisterScriptinterface |
( |
ScriptInterface * |
pScriptInterface | ) |
|
Unregister a ScriptInerface that was previously registered using RegisterScriptinterface.
- Parameters
-
Definition at line 474 of file DebuggingServer.cpp.
const char * CDebuggingServer::header400 |
|
staticprivate |
Initial value:=
"HTTP/1.1 400 Bad Request\r\n"
"Content-Type: text/plain; charset=utf-8\r\n\r\n"
"Invalid request"
Definition at line 85 of file DebuggingServer.h.
double CDebuggingServer::m_BreakPointsLockID |
|
private |
SDL_sem* CDebuggingServer::m_BreakPointsSem |
|
private |
bool CDebuggingServer::m_BreakRequestedByThread |
|
private |
bool CDebuggingServer::m_BreakRequestedByUser |
|
private |
uint CDebuggingServer::m_LastThreadDebuggerID |
|
private |
CMutex CDebuggingServer::m_Mutex |
|
private |
Mutexes used to ensure thread-safety.
Currently we just use one Mutex (m_Mutex) and if we detect possible sources of deadlocks, we use the second mutex for some members to avoid it.
Definition at line 140 of file DebuggingServer.h.
CMutex CDebuggingServer::m_Mutex1 |
|
private |
bool CDebuggingServer::m_SettingBreakOnException |
|
private |
bool CDebuggingServer::m_SettingSimultaneousThreadBreak |
|
private |
Shared between multiple scriptinerface threads and multiple mongoose threads.
Definition at line 123 of file DebuggingServer.h.
The documentation for this class was generated from the following files: