| 804 | return name |
| 805 | |
| 806 | def _LoadKernelSymbols(self, code_map): |
| 807 | if not os.path.exists(KERNEL_ALLSYMS_FILE): |
| 808 | print("Warning: %s not found" % KERNEL_ALLSYMS_FILE, file=sys.stderr) |
| 809 | return False |
| 810 | kallsyms = open(KERNEL_ALLSYMS_FILE, "r") |
| 811 | code = None |
| 812 | for line in kallsyms: |
| 813 | match = KERNEL_ALLSYMS_LINE_RE.match(line) |
| 814 | if match: |
| 815 | start_address = int(match.group(1), 16) |
| 816 | end_address = start_address |
| 817 | name = match.group(2) |
| 818 | if code: |
| 819 | code.end_address = start_address |
| 820 | code_map.Add(code, 16) |
| 821 | code = Code(name, start_address, end_address, "kernel", 0) |
| 822 | return True |
| 823 | |
| 824 | |
| 825 | def PrintReport(code_map, library_repo, arch, ticks, options): |