コード例 #1
0
ファイル: debugger.cpp プロジェクト: fredemmott/hhvm
void Debugger::DebuggerSession(const DebuggerClientOptions& options,
                                bool restart) {
  TRACE(2, "Debugger::DebuggerSession: restart=%d\n", restart);
  if (options.extension.empty()) {
    // even if it's empty, still need to call for warmup
    hphp_invoke_simple("", true); // not to run the 1st file if compiled
  } else {
    hphp_invoke_simple(options.extension, false /* warmup only */);
  }

  if (!DebuggerHook::attach<HphpdHook>()) {
    Logger::Error("Failed to attach to thread: another debugger is "
                  "unexpectedly hooked");
  }
  if (!restart) {
    DebuggerDummyEnv dde;
    Debugger::InterruptSessionStarted(options.fileName.c_str());
  }
  if (!options.fileName.empty()) {
    hphp_invoke_simple(options.fileName, false /* warmup only */);
  }
  {
    DebuggerDummyEnv dde;
    Debugger::InterruptSessionEnded(options.fileName.c_str());
  }
}
コード例 #2
0
ファイル: debugger.cpp プロジェクト: AviMoto/hiphop-php
void Debugger::DebuggerSession(const DebuggerClientOptions& options,
                               const std::string& file, bool restart) {
  if (options.extension.empty()) {
    // even if it's empty, still need to call for warmup
    hphp_invoke_simple("", true); // not to run the 1st file if compiled
  } else {
    hphp_invoke_simple(options.extension);
  }
  ThreadInfo *ti = ThreadInfo::s_threadInfo.getNoCheck();
  ti->m_reqInjectionData.debugger = true;
  if (!restart) {
    DebuggerDummyEnv dde;
    Debugger::InterruptSessionStarted(file.c_str());
  }
  hphp_invoke_simple(file);
  {
    DebuggerDummyEnv dde;
    Debugger::InterruptSessionEnded(file.c_str());
  }
}
コード例 #3
0
ファイル: debugger.cpp プロジェクト: AmineCherrai/hhvm
void Debugger::DebuggerSession(const DebuggerClientOptions& options,
                                bool restart) {
  TRACE(2, "Debugger::DebuggerSession: restart=%d\n", restart);
  if (options.extension.empty()) {
    // even if it's empty, still need to call for warmup
    hphp_invoke_simple("", true); // not to run the 1st file if compiled
  } else {
    hphp_invoke_simple(options.extension, false /* warmup only */);
  }
  DebugHookHandler::attach<DebuggerHookHandler>();
  if (!restart) {
    DebuggerDummyEnv dde;
    Debugger::InterruptSessionStarted(options.fileName.c_str());
  }
  if (!options.fileName.empty()) {
    hphp_invoke_simple(options.fileName, false /* warmup only */);
  }
  {
    DebuggerDummyEnv dde;
    Debugger::InterruptSessionEnded(options.fileName.c_str());
  }
}
コード例 #4
0
ファイル: debugger.cpp プロジェクト: floreal/hiphop-php
void Debugger::DebuggerSession(const DebuggerClientOptions& options,
                                bool restart) {
  TRACE(2, "Debugger::DebuggerSession: restart=%d\n", restart);
  if (options.extension.empty()) {
    // even if it's empty, still need to call for warmup
    hphp_invoke_simple("", true); // not to run the 1st file if compiled
  } else {
    hphp_invoke_simple(options.extension);
  }
  ThreadInfo *ti = ThreadInfo::s_threadInfo.getNoCheck();
  ti->m_reqInjectionData.setDebugger(true);
  if (!restart) {
    DebuggerDummyEnv dde;
    Debugger::InterruptSessionStarted(options.fileName.c_str());
  }
  if (!options.fileName.empty()) {
    hphp_invoke_simple(options.fileName);
  }
  {
    DebuggerDummyEnv dde;
    Debugger::InterruptSessionEnded(options.fileName.c_str());
  }
}