7from lldb import (
8 SBData,
9▶ SBError,
10 eBasicTypeChar32,
11 eBasicTypeDouble,
· · ·
361 chars = [vec.GetChildAtIndex(i).GetValueAsUnsigned() for i in range(length)]
362 return (
363▶ bytes(chars).decode(errors="replace")
364 if PY3
365 else "".join(chr(char) for char in chars)
· · ·
368
369def read_string(
370▶ process: SBProcess, address: int, length: int, error: Optional[SBError] = None
371) -> str:
372 """Reads a string from running process's memory. If `error` is passed in, it will be passed
· · ·
372▶ """Reads a string from running process's memory. If `error` is passed in, it will be passed
373 to the `SBProcess.ReadMemory` call, and will reflect any errors after the function is called.
374
· · ·
373▶ to the `SBProcess.ReadMemory` call, and will reflect any errors after the function is called.
374
375 If any error or exception occurs, a placeholder byte array of the form "<error: [reason]>" will
+ 15 more matches in this file