26 Target::Process *_process;
27 std::vector<int> _programmedSignals;
28 std::map<uint64_t, size_t> _allocations;
29 std::map<uint64_t, Architecture::CPUState> _savedRegisters;
37 std::mutex _resumeSessionLock;
39 std::string _consoleBuffer;
43 EnvironmentBlock
const &env);
49 size_t getGPRSize()
const override;
52 ErrorCode onInterrupt(
Session &session)
override;
55 ErrorCode onQuerySupported(
Session &session,
56 Feature::Collection
const &remoteFeatures,
57 Feature::Collection &localFeatures)
const override;
58 ErrorCode onPassSignals(
Session &session,
59 std::vector<int>
const &signals)
override;
60 ErrorCode onProgramSignals(
Session &session,
61 std::vector<int>
const &signals)
override;
62 ErrorCode onNonStopMode(
Session &session,
bool enable)
override;
63 ErrorCode onSendInput(
Session &session, ByteVector
const &buf)
override;
66 ErrorCode onQueryCurrentThread(
Session &session,
68 ErrorCode onThreadIsAlive(
Session &session,
70 ErrorCode onQueryAttached(
Session &session, ProcessId pid,
71 bool &attachedProcess)
const override;
72 ErrorCode onQueryProcessInfo(
Session &session,
74 ErrorCode onQueryHardwareWatchpointCount(
Session &session,
75 size_t &count)
const override;
79 ErrorCode onQueryThreadList(
Session &session, ProcessId pid, ThreadId lastTid,
80 ThreadId &tid)
const override;
82 ErrorCode onQueryFileLoadAddress(
Session &session,
83 std::string
const &file_path,
87 ErrorCode onQueryRegisterInfo(
Session &session, uint32_t regno,
91 ErrorCode onQuerySharedLibrariesInfoAddress(
Session &session,
92 Address &address)
const override;
95 ErrorCode onXferRead(
Session &session, std::string
const &
object,
96 std::string
const &annex, uint64_t offset,
97 uint64_t length, std::string &buffer,
101 ErrorCode onSetStdFile(
Session &session,
int fileno,
102 std::string
const &path)
override;
107 Architecture::GPRegisterValueVector ®s)
override;
108 ErrorCode onWriteGeneralRegisters(
Session &session,
110 std::vector<uint64_t>
const ®s)
override;
113 uint64_t &
id)
override;
115 uint64_t
id)
override;
118 uint32_t regno, std::string &value)
override;
121 std::string
const &value)
override;
125 size_t length, ByteVector &data)
override;
127 ByteVector
const &data,
size_t &nwritten)
override;
129 ErrorCode onAllocateMemory(
Session &session,
size_t size,
130 uint32_t permissions,
Address &address)
override;
131 ErrorCode onDeallocateMemory(
Session &session,
132 Address const &address)
override;
134 ErrorCode onQueryMemoryRegionInfo(
Session &session,
Address const &address,
138 ErrorCode onSetEnvironmentVariable(
Session &session, std::string
const &name,
139 std::string
const &value)
override;
140 ErrorCode onSetProgramArguments(
Session &session,
141 StringCollection
const &args)
override;
142 ErrorCode onQueryLaunchSuccess(
Session &session,
143 ProcessId pid)
const override;
146 ErrorCode onAttach(
Session &session, ProcessId pid, AttachMode mode,
148 ErrorCode onRunAttach(
Session &session, std::string
const &filename,
149 StringCollection
const &arguments,
153 ErrorCode onResume(
Session &session,
154 ThreadResumeAction::Collection
const &actions,
158 ErrorCode onDetach(
Session &session, ProcessId pid,
bool stopped)
override;
159 ErrorCode onExitServer(
Session &session)
override;
162 ErrorCode onInsertBreakpoint(
Session &session, BreakpointType type,
163 Address const &address, uint32_t size,
164 StringCollection
const &conditions,
165 StringCollection
const &commands,
166 bool persistentCommands)
override;
167 ErrorCode onRemoveBreakpoint(
Session &session, BreakpointType type,
168 Address const &address, uint32_t kind)
override;
172 ErrorCode queryStopInfo(
Session &session, Target::Thread *thread,
178 ErrorCode fetchStopInfoForAllThreads(
Session &session,
179 std::vector<StopInfo> &stops,
181 ErrorCode createThreadsStopInfo(
Session &session,
182 JSArray &threadsStopInfo)
override;
185 ErrorCode spawnProcess(StringCollection
const &args,
186 EnvironmentBlock
const &env);
187 void appendOutput(
char const *buf,
size_t size);