25 size_t getGPRSize()
const override;
28 ErrorCode onEnableExtendedMode(
Session &session)
override;
29 ErrorCode onSetBaudRate(
Session &session, uint32_t speed)
override;
30 ErrorCode onToggleDebugFlag(
Session &session)
override;
32 ErrorCode onSetMaxPacketSize(
Session &session,
size_t size)
override;
33 ErrorCode onSetMaxPayloadSize(
Session &session,
size_t size)
override;
35 ErrorCode onSetLogging(
Session &session, std::string
const &mode,
36 std::string
const &filename,
37 StringCollection
const &flags)
override;
38 ErrorCode onSendInput(
Session &session, ByteVector
const &buf)
override;
41 onAllowOperations(
Session &session,
42 std::map<std::string, bool>
const &operations)
override;
43 ErrorCode onQuerySupported(
Session &session,
44 Feature::Collection
const &remoteFeatures,
45 Feature::Collection &localFeatures)
const override;
47 ErrorCode onExecuteCommand(
Session &session,
48 std::string
const &command)
override;
50 ErrorCode onQueryServerVersion(
Session &session,
52 ErrorCode onQueryHostInfo(
Session &session,
HostInfo &info)
const override;
53 ErrorCode onQueryFileLoadAddress(
Session &session,
54 std::string
const &file_path,
58 ErrorCode onEnableControlAgent(
Session &session,
bool enable)
override;
59 ErrorCode onNonStopMode(
Session &session,
bool enable)
override;
60 ErrorCode onEnableBTSTracing(
Session &session,
bool enable)
override;
62 ErrorCode onPassSignals(
Session &session,
63 std::vector<int>
const &signals)
override;
64 ErrorCode onProgramSignals(
Session &session,
65 std::vector<int>
const &signals)
override;
67 ErrorCode onQuerySymbol(
Session &session, std::string
const &name,
68 std::string
const &value,
69 std::string &next)
const override;
71 ErrorCode onQueryRegisterInfo(
Session &session, uint32_t regno,
74 ErrorCode onAttach(
Session &session, ProcessId pid, AttachMode mode,
76 ErrorCode onAttach(
Session &session, std::string
const &name, AttachMode mode,
78 ErrorCode onRunAttach(
Session &session, std::string
const &filename,
79 StringCollection
const &arguments,
81 ErrorCode onDetach(
Session &session, ProcessId pid,
bool stopped)
override;
82 ErrorCode onQueryAttached(
Session &session, ProcessId pid,
83 bool &attachedProcess)
const override;
84 ErrorCode onQueryProcessInfo(
Session &session,
87 ErrorCode onQueryHardwareWatchpointCount(
Session &session,
88 size_t &count)
const override;
92 bool &isSegment)
const override;
93 ErrorCode onQuerySharedLibrariesInfoAddress(
Session &session,
94 Address &address)
const override;
95 ErrorCode onQuerySharedLibraryInfo(
Session &session, std::string
const &path,
96 std::string
const &triple,
98 ErrorCode onQueryModuleInfo(
Session &session, std::string &path,
102 ErrorCode onRestart(
Session &session, ProcessId pid)
override;
103 ErrorCode onInterrupt(
Session &session)
override;
106 ErrorCode onExitServer(
Session &session)
override;
108 ErrorCode onSynchronizeThreadState(
Session &session, ProcessId pid)
override;
115 ErrorCode onQueryThreadList(
Session &session, ProcessId pid, ThreadId lastTid,
116 ThreadId &tid)
const override;
121 ErrorCode onQueryCurrentThread(
Session &session,
123 ErrorCode onThreadIsAlive(
Session &session,
126 uint32_t mode,
void *info)
const override;
130 Address &address)
const override;
132 Address &address)
const override;
134 ErrorCode onEnableAsynchronousProfiling(
Session &session,
136 bool enabled, uint32_t interval,
137 uint32_t scanType)
override;
139 uint32_t scanType,
void *data)
const override;
141 ErrorCode onResume(
Session &session,
142 ThreadResumeAction::Collection
const &actions,
147 Architecture::GPRegisterValueVector ®s)
override;
148 ErrorCode onWriteGeneralRegisters(
Session &session,
150 std::vector<uint64_t>
const ®s)
override;
153 uint64_t &
id)
override;
155 uint64_t
id)
override;
158 uint32_t regno, std::string &value)
override;
161 std::string
const &value)
override;
164 size_t length, ByteVector &data)
override;
166 ByteVector
const &data,
size_t &nwritten)
override;
168 ErrorCode onAllocateMemory(
Session &session,
size_t size,
169 uint32_t permissions,
Address &address)
override;
170 ErrorCode onDeallocateMemory(
Session &session,
171 Address const &address)
override;
172 ErrorCode onQueryMemoryRegionInfo(
Session &session,
Address const &address,
176 size_t length, uint32_t &crc)
override;
179 std::string
const &pattern,
Address &location)
override;
180 ErrorCode onSearchBackward(
Session &session,
Address const &address,
181 uint32_t pattern, uint32_t mask,
184 ErrorCode onInsertBreakpoint(
Session &session, BreakpointType type,
185 Address const &address, uint32_t kind,
186 StringCollection
const &conditions,
187 StringCollection
const &commands,
188 bool persistentCommands)
override;
189 ErrorCode onRemoveBreakpoint(
Session &session, BreakpointType type,
190 Address const &address, uint32_t kind)
override;
192 ErrorCode onXferRead(
Session &session, std::string
const &
object,
193 std::string
const &annex, uint64_t offset,
194 uint64_t length, std::string &buffer,
195 bool &last)
override;
196 ErrorCode onXferWrite(
Session &session, std::string
const &
object,
197 std::string
const &annex, uint64_t offset,
198 std::string
const &buffer,
size_t &nwritten)
override;
199 ErrorCode fetchStopInfoForAllThreads(
Session &session,
200 std::vector<StopInfo> &stops,
202 ErrorCode createThreadsStopInfo(
Session &session,
203 JSArray &threadsStopInfo)
override;
206 ErrorCode onDisableASLR(
Session &session,
bool disable)
override;
208 ErrorCode onSetEnvironmentVariable(
Session &session, std::string
const &name,
209 std::string
const &value)
override;
210 ErrorCode onSetWorkingDirectory(
Session &session,
211 std::string
const &path)
override;
212 ErrorCode onSetStdFile(
Session &session,
int fileno,
213 std::string
const &path)
override;
215 ErrorCode onSetArchitecture(
Session &session,
216 std::string
const &architecture)
override;
218 ErrorCode onSetProgramArguments(
Session &session,
219 StringCollection
const &args)
override;
221 ErrorCode onExecuteProgram(
Session &session, std::string
const &command,
223 std::string
const &workingDirectory,
226 ErrorCode onFileCreateDirectory(
Session &session, std::string
const &path,
227 uint32_t mode)
override;
229 ErrorCode onFileOpen(
Session &session, std::string
const &path,
230 OpenFlags flags, uint32_t mode,
int &fd)
override;
231 ErrorCode onFileClose(
Session &session,
int fd)
override;
232 ErrorCode onFileRead(
Session &session,
int fd, uint64_t &count,
233 uint64_t offset, ByteVector &buffer)
override;
234 ErrorCode onFileWrite(
Session &session,
int fd, uint64_t offset,
235 ByteVector
const &buffer, uint64_t &nwritten)
override;
237 ErrorCode onFileRemove(
Session &session, std::string
const &path)
override;
238 ErrorCode onFileReadLink(
Session &session, std::string
const &path,
239 std::string &resolved)
override;
240 ErrorCode onFileSetPermissions(
Session &session, std::string
const &path,
241 uint32_t mode)
override;
243 ErrorCode onFileExists(
Session &session, std::string
const &path)
override;
244 ErrorCode onFileComputeMD5(
Session &session, std::string
const &path,
245 uint8_t digest[16])
override;
246 ErrorCode onFileGetSize(
Session &session, std::string
const &path,
247 uint64_t &size)
override;
248 ErrorCode onFileGetMode(
Session &session, std::string
const &path,
249 uint32_t &mode)
const override;
250 ErrorCode onFileFstat(
Session &session,
int fd,
251 ByteVector &buffer)
const override;
255 ErrorCode onQueryProcessInfoPID(
Session &session, ProcessId pid,
258 ErrorCode onLaunchDebugServer(
Session &session, std::string
const &host,
259 uint16_t &port, ProcessId &pid)
override;
261 ErrorCode onQueryLaunchSuccess(
Session &session,
262 ProcessId pid)
const override;
264 ErrorCode onQueryUserName(
Session &session, UserId
const &uid,
265 std::string &name)
const override;
266 ErrorCode onQueryGroupName(
Session &session, GroupId
const &gid,
267 std::string &name)
const override;
268 ErrorCode onQueryWorkingDirectory(
Session &session,
269 std::string &workingDir)
const override;
272 ErrorCode onReset(
Session &session)
override;
274 size_t length)
override;
276 ByteVector
const &data)
override;
277 ErrorCode onFlashDone(
Session &session)
override;