Read a null terminated string from a given
(elf-read-string-null-term byte-list offset) → str
Function:
(defun elf-read-string-null-term (byte-list offset) (declare (xargs :guard (and (byte-listp byte-list) (natp offset)))) (declare (xargs :guard (<= offset (len byte-list)))) (let ((__function__ 'elf-read-string-null-term)) (declare (ignorable __function__)) (let* ((bytes (elf-read-mem-null-term byte-list offset)) (charlist (bytes->charlist bytes))) (coerce charlist 'string))))
Theorem:
(defthm stringp-of-elf-read-string-null-term (b* ((str (elf-read-string-null-term byte-list offset))) (stringp str)) :rule-classes :type-prescription)