file ¤
Retrieve files from the debuggee's filesystem. Useful when debugging a remote process over SSH or similar, where e.g. /proc/FOO/maps is needed from the remote system.
Functions:
-
reset_remote_files– -
remote_files_dir– -
get_proc_exe_file–Returns the local path to the debugged file name.
-
can_download_remote_file– -
get_file–Downloads the specified file from the system where the current process is
-
get–Retrieves the contents of the specified file on the system
-
readlink–readlink(path) -> str
-
is_vfile_qemu_user_bug– -
vfile_readlink–Reads the target of a symbolic link on the remote system.
-
vfile_readfile–Reads the entire content of a file on the remote system.
-
vfile_open–Opens a file on the remote system and returns the file descriptor.
-
gdb_memtox_inverse– -
vfile_pread–Reads data from a file descriptor.
-
vfile_close–Closes a previously opened file descriptor.
get_file ¤
Downloads the specified file from the system where the current process is being debugged.
If the path is prefixed with "target:" the prefix is stripped (to support remote target paths properly).
If the try_local_path is set to True and the path exists locally and "target:" prefix is not present, it will return the local path instead of downloading the file.
Returns:
-
str–The local path to the file
get ¤
Retrieves the contents of the specified file on the system where the current process is being debugged.
Returns:
-
bytes–A byte array, or None.
readlink ¤
readlink(path) -> str
Read the link specified by 'path' on the system being debugged.
Handles local, qemu-usermode, and remote debugging cases.
vfile_readlink ¤
Reads the target of a symbolic link on the remote system.
:param pathname: The path to the symbolic link (string). :param buffer_size: The size of the buffer to read into (integer). :return: The target of the symbolic link as a string.
vfile_readfile ¤
Reads the entire content of a file on the remote system.
:param filename: The path to the file (string). :param chunk_size: The number of bytes to read in each iteration (integer). :return: The complete content of the file as bytes.
vfile_open ¤
Opens a file on the remote system and returns the file descriptor.
:param filename: The path to the file (string). :param flags: Flags passed to the open call (integer, base 16). These correspond to the constant values in the enum OpenOptions from LLDB’s File.h, not the traditional open(2) flags. :param mode: Mode bits for the file (integer, base 16). :return: File descriptor (integer), or raises an exception if an error occurs.
vfile_pread ¤
Reads data from a file descriptor.
:param fd: File descriptor (integer). :param size: Number of bytes to read (integer, base 16). :param offset: Offset in the file to start reading from (integer, base 16). :return: Tuple of (bytes_read, data) where bytes_read is an integer and data is the binary data.
vfile_close ¤
Closes a previously opened file descriptor.
:param fd: File descriptor (integer). :return: None, or raises an exception if an error occurs.