29 typedef std::map<std::string, std::string> EnvironmentMap;
33 std::string _workingDirectory;
34 EnvironmentMap _environment;
35 std::string _stdFile[3];
36 StringCollection _arguments;
37 std::vector<ProcessId> _processList;
38 ErrorCode _lastLaunchResult;
41 template <
typename... Args>
43 : T(std::forward<Args>(args)...), _disableASLR(
false),
44 _workingDirectory(Platform::GetWorkingDirectory()),
45 _lastLaunchResult(kSuccess) {}
48 ErrorCode onDisableASLR(
Session &session,
bool disable)
override;
49 ErrorCode onSetArchitecture(
Session &session,
50 std::string
const &architecture)
override;
51 ErrorCode onSetWorkingDirectory(
Session &session,
52 std::string
const &path)
override;
53 ErrorCode onQueryWorkingDirectory(
Session &session,
54 std::string &workingDir)
const override;
55 ErrorCode onSetEnvironmentVariable(
Session &session, std::string
const &name,
56 std::string
const &value)
override;
57 ErrorCode onSetStdFile(
Session &session,
int fileno,
58 std::string
const &path)
override;
59 ErrorCode onSetProgramArguments(
Session &session,
60 StringCollection
const &args)
override;
61 ErrorCode onQueryLaunchSuccess(
Session &session,
62 ProcessId pid)
const override;
63 ErrorCode onQueryProcessInfo(
Session &session,
69 ErrorCode spawnProcess();
70 static bool isDebugServer(StringCollection
const &args);