def find_symbol(pid, symbol):
for mapping in read_proc_maps(pid):<EOL><INDENT>if not mapping.filename or not os.path.exists(mapping.filename):<EOL><INDENT>continue<EOL><DEDENT>if '<STR_LIT:x>' not in mapping.perms or mapping.offset:<EOL><INDENT>continue<EOL><DEDENT>offset = find_symbol_in_file(mapping.filename, symbol)<EOL>absolute = os.path.samefile(mapping.filename, get_pid_executable(pid))<EOL>if offset is not None:<EOL><INDENT>yield mapping, offset, absolute<EOL><DEDENT><DEDENT>
Return [(MemMap, value), ...]