Keep the hphpd alive and responsive after the run command.
When debugging a script using a local VM (i.e. when there is no remote VM), the cleanup actions performed by the run command caused the debugger client to shut down as well. Since this seems to be intentional, processing of the run command now restarts the debugger client and proxy. Also, following a ctrl-C, the m_lastLocFilter field must be cleared, otherwise an empty endless loop cannot be broken into for a second time.
Esse commit está contido em:
@@ -491,8 +491,6 @@ void execute_command_line_begin(int argc, char **argv, int xhprof) {
|
||||
}
|
||||
}
|
||||
|
||||
namespace Eval { void shutdown_hphpd(); }
|
||||
|
||||
void execute_command_line_end(int xhprof, bool coverage, const char *program) {
|
||||
ThreadInfo *ti = ThreadInfo::s_threadInfo.getNoCheck();
|
||||
|
||||
@@ -509,8 +507,6 @@ void execute_command_line_end(int xhprof, bool coverage, const char *program) {
|
||||
!RuntimeOption::CodeCoverageOutputFile.empty()) {
|
||||
ti->m_coverage->Report(RuntimeOption::CodeCoverageOutputFile);
|
||||
}
|
||||
|
||||
Eval::shutdown_hphpd();
|
||||
}
|
||||
|
||||
static void pagein_self(void) {
|
||||
@@ -1067,6 +1063,7 @@ static int execute_program_impl(int argc, char **argv) {
|
||||
}
|
||||
|
||||
free(new_argv);
|
||||
Eval::DebuggerClient::Shutdown();
|
||||
hphp_process_exit();
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -65,14 +65,6 @@ static DebuggerClient& getStaticDebuggerClient() {
|
||||
return *debugger_client;
|
||||
}
|
||||
|
||||
void shutdown_hphpd() {
|
||||
TRACE(2, "DebuggerClient::shutdown_hphpd\n");
|
||||
if (debugger_client) {
|
||||
debugger_client->resetSmartAllocatedMembers();
|
||||
debugger_client.reset();
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// readline setups
|
||||
|
||||
@@ -297,6 +289,14 @@ SmartPtr<Socket> DebuggerClient::Start(const DebuggerClientOptions &options) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
void DebuggerClient::Shutdown() {
|
||||
TRACE(2, "DebuggerClient::Shutdown\n");
|
||||
if (debugger_client) {
|
||||
debugger_client->resetSmartAllocatedMembers();
|
||||
debugger_client.reset();
|
||||
}
|
||||
}
|
||||
|
||||
void DebuggerClient::Stop() {
|
||||
TRACE(2, "DebuggerClient::Stop\n");
|
||||
getStaticDebuggerClient().stop();
|
||||
|
||||
@@ -68,6 +68,7 @@ public:
|
||||
*/
|
||||
static SmartPtr<Socket> Start(const DebuggerClientOptions &options);
|
||||
static void Stop();
|
||||
static void Shutdown();
|
||||
|
||||
/**
|
||||
* Pre-defined auto-complete lists. Append-only, as they will be used in
|
||||
|
||||
@@ -84,6 +84,7 @@ struct CLISession : boost::noncopyable {
|
||||
ThreadInfo::s_threadInfo.getNoCheck()->
|
||||
m_reqInjectionData.debugger = false;
|
||||
execute_command_line_end(0, false, nullptr);
|
||||
Eval::DebuggerClient::Shutdown();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário