@@ -208,6 +208,163 @@ This packet must be sent _prior_ to sending a "A" packet.
208
208
send packet: QListThreadsInStopReply
209
209
read packet: OK
210
210
211
+ //----------------------------------------------------------------------
212
+ // jTraceStart:
213
+ //
214
+ // BRIEF
215
+ // Packet for starting trace of type lldb::TraceType. The following
216
+ // parameters should be appended to the packet formatted as a JSON
217
+ // dictionary, where the schematic for the JSON dictionary in terms of
218
+ // the recognized Keys is given below in the table.
219
+ // Different tracing types could require different custom parameters.
220
+ // Such custom tracing parameters if needed should be collectively
221
+ // specified in a JSON dictionary and the dictionary can be appended
222
+ // to this packet (as Value corresponding to "params"). Since sending
223
+ // JSON data over gdb-remote protocol has certain limitations, binary
224
+ // escaping convention should be used.
225
+ //
226
+ // Following is the list of parameters -
227
+ //
228
+ // Key Value (Integer) (O)Optional/
229
+ // (except params which should be a (M)Mandatory
230
+ // JSON dictionary)
231
+ // ========== ====================================================
232
+ //
233
+ // type The type of trace to start (see M
234
+ // lldb-enumerations for TraceType)
235
+ //
236
+ // buffersize The size of the buffer to allocate M
237
+ // for trace gathering.
238
+ //
239
+ // threadid The id of the thread to start tracing O
240
+ // on.
241
+ //
242
+ // metabuffersize The size of buffer to hold meta data O
243
+ // used for decoding the trace data.
244
+ //
245
+ // params Any parameters that are specific to O
246
+ // certain trace technologies should be
247
+ // collectively specified as a JSON
248
+ // dictionary
249
+ // ========== ====================================================
250
+ //
251
+ // Each tracing instance is identified by a trace id which is returned
252
+ // as the reply to this packet. In case the tracing failed to begin an
253
+ // error code is returned instead.
254
+ //----------------------------------------------------------------------
255
+
256
+ send packet: jTraceStart:{"type":<type>,"buffersize":<buffersize>}]
257
+ read packet: <trace id>/E<error code>
258
+
259
+ //----------------------------------------------------------------------
260
+ // jTraceStop:
261
+ //
262
+ // BRIEF
263
+ // Stop tracing instance with trace id <trace id>, of course trace
264
+ // needs to be started before. The following parameters should be
265
+ // formatted as a JSON dictionary to the packet. Since sending
266
+ // JSON data over gdb-remote protocol has certain limitations, binary
267
+ // escaping convention should be used.
268
+ //
269
+ // Following is the list of parameters -
270
+ //
271
+ // Key Value (Integer) (O)Optional/
272
+ // (M)Mandatory
273
+ // ========== ====================================================
274
+ //
275
+ // traceid The trace id of the tracing instance M
276
+ //
277
+ // threadid The id of the thread to stop tracing O
278
+ // on. Since <trace id> could map to
279
+ // multiple trace instances (in case it
280
+ // maps to the complete process), the
281
+ // threadid of a particular thread could
282
+ // be appended as "threadid:<thread id>;"
283
+ // to stop tracing on that thread.
284
+ // ========== ====================================================
285
+ //
286
+ // An OK response is sent in case of success else an error code is
287
+ // returned.
288
+ //----------------------------------------------------------------------
289
+
290
+ send packet: jTraceStop:{"traceid":<trace id>}]
291
+ read packet: <OK response>/E<error code>
292
+
293
+ //----------------------------------------------------------------------
294
+ // jTraceBufferRead:
295
+ //
296
+ // BRIEF
297
+ // Packet for reading the trace for tracing instance <trace id>, i.e the
298
+ // id obtained from StartTrace API. The following parameters should be
299
+ // formatted as a JSON dictionary to the packet. Since sending
300
+ // JSON data over gdb-remote protocol has certain limitations, binary
301
+ // escaping convention should be used.
302
+ //
303
+ // Following is the list of parameters -
304
+ //
305
+ // Key Value (Integer) (O)Optional/
306
+ // (M)Mandatory
307
+ // ========== ====================================================
308
+ // traceid The trace id of the tracing instance M
309
+ //
310
+ // offset The offset to start reading the data M
311
+ // from.
312
+ //
313
+ // buffersize The size of the data intended to read. M
314
+ //
315
+ // threadid The id of the thread to retrieve data O
316
+ // from.
317
+ // ========== ====================================================
318
+ //
319
+ // The trace data is sent as raw binary data if the read was successful
320
+ // else an error code is sent.
321
+ //----------------------------------------------------------------------
322
+
323
+ send packet: jTraceBufferRead:{"traceid":<trace id>,"offset":<byteoffset>,"buffersize":<byte_count>}]
324
+ read packet: <binary trace data>/E<error code>
325
+
326
+ //----------------------------------------------------------------------
327
+ // jTraceMetaRead:
328
+ //
329
+ // BRIEF
330
+ // Similar Packet as above except it reads meta data.
331
+ //----------------------------------------------------------------------
332
+
333
+ /----------------------------------------------------------------------
334
+ // jTraceConfigRead:
335
+ //
336
+ // BRIEF
337
+ // Request the trace configuration for the tracing instance with id
338
+ // <trace id>.
339
+ //
340
+ // Following is the list of parameters -
341
+ //
342
+ // Key Value (Integer) (O)Optional/
343
+ // (M)Mandatory
344
+ // ========== ====================================================
345
+ // traceid The trace id of the tracing instance M
346
+ //
347
+ // threadid The id of the thread to obtain trace O
348
+ // configuration from. Since <trace id>
349
+ // could map to multiple trace instances
350
+ // (in case it maps to the complete
351
+ // process), the threadid of a particular
352
+ // thread could be appended as
353
+ // "threadid:<thread id>;" to obtain the
354
+ // trace configuration of that thread.
355
+ // ========== ====================================================
356
+ //
357
+ // In the response packet the trace configuration is sent as text,
358
+ // formatted as a JSON dictionary. Since sending JSON data over
359
+ // gdb-remote protocol has certain limitations, binary escaping
360
+ // convention is used.
361
+ // In case the trace instance with the <trace id> was not found, an
362
+ // error code is returned.
363
+ //----------------------------------------------------------------------
364
+
365
+ send packet: jTraceConfigRead:{"traceid":<trace id>}
366
+ read packet: {"conf1":<conf1>,"conf2":<conf2>,"params":{"paramName":paramValue}]}];/E<error code>
367
+
211
368
//----------------------------------------------------------------------
212
369
// "qRegisterInfo<hex-reg-id>"
213
370
//
0 commit comments