Lines Matching +full:int +full:- +full:b

5 # SPDX-License-Identifier: Apache-2.0
41 data = b''
46 if ch == b'$':
52 if ch == b'#':
59 # Get checksum (2-bytes)
68 socket.send(b'+')
74 socket.send(b'-')
87 pkt = b'$' + data + b'#'
107 barray = b''
118 offset = addr - r['start']
122 remaining -= 1
128 pkt = b'S'
142 self.put_gdb_packet(b"E01")
146 self.put_gdb_packet(b"E01")
152 self.put_gdb_packet(b"E01")
159 str_addr, str_length = pkt[1:].split(b',')
160 s_addr = int(b'0x' + str_addr, 16)
161 length = int(b'0x' + str_length, 16)
169 self.put_gdb_packet(b"E01")
175 self.put_gdb_packet(b"E02")
180 if pkt[0:12] == b"qfThreadInfo":
184 self.put_gdb_packet(b"l")
192 curr_thread_ptr = int.from_bytes(curr_thread_ptr_bytes, "little")
196 response = b"m1"
201 thread_ptr = int.from_bytes(thread_ptr_bytes, "little")
206 response += b"," + bytes(str(thread_count), 'ascii')
214 thread_ptr = int.from_bytes(thread_ptr_bytes, "little")
222 response += b"," + bytes(f'{thread_count:x}', 'ascii')
227 elif pkt[0:12] == b"qsThreadInfo":
228 self.put_gdb_packet(b"l")
231 elif pkt[0:16] == b"qThreadExtraInfo":
232 thread_info_bytes = b''
238 thread_id = int(thread_index_str, 16)
240 thread_info_bytes += b'name: '
241 thread_ptr = self.thread_ptrs[thread_id - 1]
246 … while (thread_name_next_byte is not None) and (thread_name_next_byte != b'\x00'):
255 thread_state = int.from_bytes(thread_state_byte, "little")
256 thread_info_bytes += b', state: ' + bytes(hex(thread_state), 'ascii')
261 thread_user_options = int.from_bytes(thread_user_options_byte, "little")
262 … thread_info_bytes += b', user_options: ' + bytes(hex(thread_user_options), 'ascii')
267 thread_prio = int.from_bytes(thread_prio_byte, "little")
268 thread_info_bytes += b', prio: ' + bytes(hex(thread_prio), 'ascii')
272 self.put_gdb_packet(b'')
274 self.put_gdb_packet(b'')
283 self.put_gdb_packet(b'OK')
285 self.put_gdb_packet(b'')
288 self.put_gdb_packet(b'')
293 if pkt[0:2] == b"Hg":
298 # Thread-id of '0' indicates an arbitrary process or thread
304 self.selected_thread = int(thread_index_str, 16) - 1
307 self.put_gdb_packet(b'')
309 self.put_gdb_packet(b'')
322 if pkt_type == b'?':
324 elif pkt_type in (b'C', b'S'):
328 elif pkt_type == b'g':
330 elif pkt_type == b'G':
332 elif pkt_type == b'p':
334 elif pkt_type == b'P':
336 elif pkt_type == b'm':
338 elif pkt_type == b'M':
340 elif pkt_type == b'q':
342 elif pkt_type == b'T':
344 elif pkt_type == b'H':
346 elif pkt_type == b'k':
350 self.put_gdb_packet(b'')