================
@@ -77,11 +78,62 @@ def hex_decode_bytes(hex_bytes):
return out
+def parse_memory_read_packet(packet):
+ """
+ Parse a memory-read packet ("m<addr>,<len>" or "x<addr>,<len>") into its
+ (addr, length) integers, or return None if it isn't a memory read.
+
+ Accepts the raw packet contents, with or without a leading "$".
+ """
+ if packet and packet[0] == "$":
----------------
bulbazord wrote:
Does this need to check for `$` at all? It looks like you only call
`parse_memory_read_packet` after you've already called `parse_packet_log`
(which extract the direction and the body only)
https://github.com/llvm/llvm-project/pull/205897
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits