Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/SoarGroup/Soar into …
Browse files Browse the repository at this point in the history
…development
  • Loading branch information
jrkirk committed Sep 18, 2024
2 parents fd37cea + fc529fa commit 282488a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
13 changes: 8 additions & 5 deletions Core/ClientSML/src/sml_ClientAgent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ Agent::Agent(Kernel* pKernel, char const* pName)

m_WorkingMemory.SetAgent(this) ;

m_pDPI = 0;
m_pDPI = nullptr;

ClearError() ;
}

Agent::~Agent()
{
KillDebugger();
KillDebugger(true);
}

Connection* Agent::GetConnection() const
Expand Down Expand Up @@ -1839,11 +1839,14 @@ bool Agent::SpawnDebugger(int port, const char* jarpath)
#endif // _WIN32
}

bool Agent::KillDebugger()
bool Agent::KillDebugger(bool ignoreNonExistent)
{
if (!m_pDPI)
{
std::cerr << "KillDebugger: No existing debugger process information" << std::endl;
if (!ignoreNonExistent)
{
std::cerr << "KillDebugger: No existing debugger process information" << std::endl;
}
return false;
}
bool successful = false;
Expand Down Expand Up @@ -1877,7 +1880,7 @@ void Agent::ClearDebuggerProcessInformation()
if (m_pDPI)
{
delete m_pDPI;
m_pDPI = 0;
m_pDPI = nullptr;
}
}

Expand Down
10 changes: 8 additions & 2 deletions Core/ClientSML/src/sml_ClientAgent.h
Original file line number Diff line number Diff line change
Expand Up @@ -884,8 +884,14 @@ namespace sml
* @brief Kills the previously spawned debugger. Returns false
* if the debugger was never spawned or an OS issue occurs
* while killing the process.
*************************************************************/
bool KillDebugger();
* @param ignoreNonExistent if true, do not print a warning if
* no debugger process exists to kill. This is useful, for example,
* when the client doesn't know if the debugger was ever actually
* opened, or whether the user may have closed the window, but wants
* to close it just in case for cleanup purposes. Not currently
* exposed via SWIG bindings.
*************************************************************/
bool KillDebugger(bool ignoreNonExistent = false);

/*************************************************************
* @brief Convert a client-side identifier string to kernel-side.
Expand Down

0 comments on commit 282488a

Please sign in to comment.