19 tok = strtok(
g->data,
";");
23 g->stub_features.pkt_sz =
RZ_MIN(strtoul(tok + strlen(
"PacketSize="),
NULL, 16), 2048);
25 g->stub_features.pkt_sz =
RZ_MAX(
g->stub_features.pkt_sz, 64);
28 tok = strtok(
NULL,
";");
33 g->stub_features.qXfer_btrace_read = (
p[strlen(
"btrace:read")] ==
'+');
35 g->stub_features.qXfer_btrace_conf_read = (
p[strlen(
"btrace-conf:read")] ==
'+');
37 g->stub_features.qXfer_spu_read = (
p[strlen(
"spu:read")] ==
'+');
39 g->stub_features.qXfer_spu_write = (
p[strlen(
"spu:write")] ==
'+');
41 g->stub_features.qXfer_libraries_read = (
p[strlen(
"libraries:read")] ==
'+');
43 g->stub_features.qXfer_libraries_svr4_read = (
p[strlen(
"libraries-svr4:read")] ==
'+');
45 g->stub_features.qXfer_memory_map_read = (
p[strlen(
"memory-map:read")] ==
'+');
47 g->stub_features.qXfer_auxv_read = (
p[strlen(
"auxv:read")] ==
'+');
49 g->stub_features.qXfer_exec_file_read = (
p[strlen(
"exec-file:read")] ==
'+');
51 g->stub_features.qXfer_features_read = (
p[strlen(
"features:read")] ==
'+');
53 g->stub_features.qXfer_sdata_read = (
p[strlen(
"sdata:read")] ==
'+');
55 g->stub_features.qXfer_siginfo_read = (
p[strlen(
"siginfo:read")] ==
'+');
57 g->stub_features.qXfer_siginfo_write = (
p[strlen(
"siginfo:write")] ==
'+');
59 g->stub_features.qXfer_threads_read = (
p[strlen(
"threads:read")] ==
'+');
61 g->stub_features.qXfer_traceframe_info_read = (
p[strlen(
"traceframe-info:read")] ==
'+');
63 g->stub_features.qXfer_uib_read = (
p[strlen(
"uib:read")] ==
'+');
65 g->stub_features.qXfer_fdpic_read = (
p[strlen(
"fdpic:read")] ==
'+');
67 g->stub_features.qXfer_osdata_read = (
p[strlen(
"osdata:read")] ==
'+');
69 }
else if (tok[0] ==
'Q') {
71 if (!tok[strlen(
"Qbtrace")]) {
72 tok = strtok(
NULL,
";");
77 g->stub_features.Qbtrace_off = (
p[4] ==
'+');
79 g->stub_features.Qbtrace_bts = (
p[4] ==
'+');
81 g->stub_features.Qbtrace_pt = (
p[3] ==
'+');
83 g->stub_features.Qbtrace_conf_bts_size = (
p[strlen(
"-conf:bts:size")] ==
'+');
85 g->stub_features.Qbtrace_conf_pt_size = (
p[strlen(
"-conf:pt:size")] ==
'+');
88 g->stub_features.QNonStop = (tok[strlen(
"QNonStop")] ==
'+');
90 g->stub_features.QCatchSyscalls = (tok[strlen(
"QCatchSyscalls")] ==
'+');
92 g->stub_features.QPassSignals = (tok[strlen(
"QPassSignals")] ==
'+');
94 g->stub_features.QStartNoAckMode = (tok[strlen(
"QStartNoAckMode")] ==
'+');
96 g->stub_features.QAgent = (tok[strlen(
"QAgent")] ==
'+');
98 g->stub_features.QAllow = (tok[strlen(
"QAllow")] ==
'+');
100 g->stub_features.QDisableRandomization = (tok[strlen(
"QDisableRandomization")] ==
'+');
102 g->stub_features.QTBuffer_size = (tok[strlen(
"QTBuffer:size")] ==
'+');
104 g->stub_features.QThreadEvents = (tok[strlen(
"QThreadEvents")] ==
'+');
107 g->stub_features.lldb.QThreadSuffixSupported = (tok[strlen(
"QThreadSuffixSupported")] ==
'+');
110 g->stub_features.lldb.QListThreadsInStopReply = (tok[strlen(
"QListThreadsInStopReply")] ==
'+');
113 g->stub_features.multiprocess = (tok[strlen(
"multiprocess")] ==
'+');
116 g->stub_features.lldb.qEcho = (tok[strlen(
"qEcho")] ==
'+');
118 g->stub_features.ReverseStep = (tok[strlen(
"ReverseStep")] ==
'+');
120 g->stub_features.ReverseContinue = (tok[strlen(
"ReverseContinue")] ==
'+');
123 tok = strtok(
NULL,
";");
138 if (
g->server_debug) {
#define GDB_REMOTE_TYPE_LLDB
RZ_API int rz_socket_write(RzSocket *s, void *buf, int len)
RZ_API bool rz_str_startswith(RZ_NONNULL const char *str, RZ_NONNULL const char *needle)
Checks if a string starts with a specifc sequence of characters (case sensitive)
int send_packet(libgdbr_t *g)
sends a packet sends a packet to the established connection
int pack(libgdbr_t *g, const char *msg)
int send_msg(libgdbr_t *g, const char *msg)
Function sends a message to the remote gdb instance.
int handle_qSupported(libgdbr_t *g)
int send_ack(libgdbr_t *g)
Functions sends a single ack ('+')
static struct sockaddr static addrlen static backlog const void msg