The symbols phys_base, _text, and _end, used in x86_page_ops are either defined in assembly or implicitly by the linker. Thus, they lack type information and cause a conversion error after gdb.parse_and_eval. Explicitly cast these expressions to unsigned long.
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -40,11 +40,11 @@ class x86_page_ops(): · 39 unmodified lines | ||
| 40 | 40 | |
| 41 | 41 | self.PAGE_OFFSET = int(gdb.parse_and_eval("page_offset_base")) |
| 42 | 42 | self.VMEMMAP_START = int(gdb.parse_and_eval("vmemmap_base")) |
| 43 | − self.PHYS_BASE = int(gdb.parse_and_eval("phys_base")) | |
| 43 | + self.PHYS_BASE = int(gdb.parse_and_eval("(unsigned long) phys_base")) | |
| 44 | 44 | self.START_KERNEL_map = 0xffffffff80000000 |
| 45 | 45 | |
| 46 | − self.KERNEL_START = gdb.parse_and_eval("_text") | |
| 47 | − self.KERNEL_END = gdb.parse_and_eval("_end") | |
| 46 | + self.KERNEL_START = gdb.parse_and_eval("(unsigned long) &_text") | |
| 47 | + self.KERNEL_END = gdb.parse_and_eval("(unsigned long) &_end") | |
| 48 | 48 | |
| 49 | 49 | self.VMALLOC_START = int(gdb.parse_and_eval("vmalloc_base")) |
| 50 | 50 | if self.VMALLOC_START == 0xffffc90000000000: |