/linux-master/scripts/gdb/linux/ |
H A D | vmalloc.py | 9 import gdb namespace 22 class LxVmallocInfo(gdb.Command): 26 super(LxVmallocInfo, self).__init__("lx-vmallocinfo", gdb.COMMAND_DATA) 30 raise gdb.GdbError("Requires MMU support") 32 nr_vmap_nodes = gdb.parse_and_eval('nr_vmap_nodes') 34 vn = gdb.parse_and_eval('&vmap_nodes[%d]' % i) 37 gdb.write("0x%x-0x%x %10d vm_map_ram\n" % (vmap_area['va_start'], vmap_area['va_end'], 41 gdb.write("0x%x-0x%x %10d" % (v['addr'], v['addr'] + v['size'], v['size'])) 43 gdb.write(" %s" % str(v['caller']).split(' ')[-1]) 45 gdb [all...] |
H A D | config.py | 5 import gdb namespace 11 class LxConfigDump(gdb.Command): 17 super(LxConfigDump, self).__init__("lx-configdump", gdb.COMMAND_DATA, 18 gdb.COMPLETE_FILENAME) 27 py_config_ptr = gdb.parse_and_eval("&kernel_config_data") 28 py_config_ptr_end = gdb.parse_and_eval("&kernel_config_data_end") 30 except gdb.error as e: 31 raise gdb.GdbError("Can't find config, enable CONFIG_IKCONFIG?") 33 inf = gdb.inferiors()[0] 41 gdb [all...] |
H A D | stackdepot.py | 9 import gdb namespace 20 stack_depot_disabled = gdb.parse_and_eval('stack_depot_disabled') 23 raise gdb.GdbError("stack_depot_disabled\n") 25 handle_parts_t = gdb.lookup_type("union handle_parts") 28 pools_num = gdb.parse_and_eval('pools_num') 31 gdb.write("pool index %d out of bounds (%d) for stack id 0x%08x\n" % (parts['pool_index'], pools_num, handle)) 32 return gdb.Value(0), 0 34 stack_pools = gdb.parse_and_eval('stack_pools') 38 stack = (pool + gdb.Value(offset).cast(utils.get_size_t_type())).cast(stack_record_type.get_type().pointer()) 42 gdb [all...] |
H A D | clk.py | 5 import gdb namespace 18 class LxClkSummary(gdb.Command): 27 super(LxClkSummary, self).__init__("lx-clk-summary", gdb.COMMAND_DATA) 30 gdb.write("%*s%-*s %7d %8d %8d %11lu%s\n" % ( 45 raise gdb.GdbError("No clocks registered") 46 gdb.write(" enable prepare protect \n") 47 gdb.write(" clock count count count rate \n") 48 gdb.write("------------------------------------------------------------------------\n") 49 for clk in clk_core_for_each_child(gdb.parse_and_eval("clk_root_list")): 51 for clk in clk_core_for_each_child(gdb [all...] |
H A D | cpus.py | 2 # gdb helper commands and functions for Linux kernel debugging 14 import gdb namespace 27 return gdb.selected_thread().num - 1 29 tid = gdb.selected_thread().ptid[2] 35 raise gdb.GdbError("Sorry, obtaining the current CPU is not yet " 36 "supported with this gdb server.") 43 offset = gdb.parse_and_eval( 47 offset = gdb.parse_and_eval( 49 except gdb.error: 62 gdb [all...] |
H A D | lists.py | 2 # gdb helper commands and functions for Linux kernel debugging 14 import gdb namespace 31 gdb.write("list_for_each: Uninitialized list '{}' treated as empty\n" 69 raise gdb.GdbError('argument must be of type (struct list_head [*])') 72 gdb.write("Starting with: {}\n".format(c)) 73 except gdb.MemoryError: 74 gdb.write('head is not accessible\n') 81 gdb.write('prev.next != current: ' 90 except gdb.MemoryError: 91 gdb [all...] |
H A D | proc.py | 3 # gdb helper commands and functions for Linux kernel debugging 15 import gdb namespace 24 class LxCmdLine(gdb.Command): 29 super(LxCmdLine, self).__init__("lx-cmdline", gdb.COMMAND_DATA) 32 gdb.write(gdb.parse_and_eval("saved_command_line").string() + "\n") 38 class LxVersion(gdb.Command): 43 super(LxVersion, self).__init__("lx-version", gdb.COMMAND_DATA) 47 gdb.write(gdb [all...] |
H A D | genpd.py | 5 import gdb namespace 38 class LxGenPDSummary(gdb.Command): 44 super(LxGenPDSummary, self).__init__('lx-genpd-summary', gdb.COMMAND_DATA) 59 gdb.write('%-30s %-15s %s\n' % ( 70 gdb.write(' %-50s %s\n' % (kobj_path, rtpm_status_str(dev))) 74 raise gdb.GdbError("No power domain(s) registered") 75 gdb.write('domain status children\n'); 76 gdb.write(' /device runtime status\n'); 77 gdb.write('----------------------------------------------------------------------\n'); 79 gdb [all...] |
H A D | modules.py | 2 # gdb helper commands and functions for Linux kernel debugging 14 import gdb namespace 41 class LxModule(gdb.Function): 56 raise gdb.GdbError("Unable to find MODULE " + mod_name) 62 class LxLsmod(gdb.Command): 68 super(LxLsmod, self).__init__("lx-lsmod", gdb.COMMAND_DATA) 71 gdb.write( 83 gdb.write("{address} {name:<19} {size:>8} {ref}".format( 93 gdb.write("{separator}{name}".format( 98 gdb [all...] |
H A D | page_owner.py | 9 import gdb namespace 27 gdb.write("Unrecognized command\n") 28 raise gdb.GdbError(t) 30 class DumpPageOwner(gdb.Command): 39 super(DumpPageOwner, self).__init__("lx-dump-page-owner", gdb.COMMAND_SUPPORT) 43 raise gdb.GdbError('CONFIG_PAGE_OWNER does not enable') 45 page_owner_inited = gdb.parse_and_eval('page_owner_inited') 47 raise gdb.GdbError('page_owner_inited is not enabled') 51 argv = gdb.string_to_argv(args) 64 self.min_pfn = int(gdb [all...] |
H A D | tasks.py | 2 # gdb helper commands and functions for Linux kernel debugging 14 import gdb namespace 24 init_task = gdb.parse_and_eval("init_task").address 45 class LxTaskByPidFunc(gdb.Function): 59 raise gdb.GdbError("No task of PID " + str(pid)) 65 class LxPs(gdb.Command): 69 super(LxPs, self).__init__("lx-ps", gdb.COMMAND_DATA) 72 gdb.write("{:>10} {:>12} {:>7}\n".format("TASK", "PID", "COMM")) 74 gdb.write("{} {:^5} {}\n".format( 94 class LxThreadInfoFunc (gdb [all...] |
H A D | vfs.py | 2 # gdb helper commands and functions for Linux kernel debugging 16 import gdb namespace 27 class DentryName(gdb.Function): 44 class InodeDentry(gdb.Function):
|
H A D | symbols.py | 2 # gdb helper commands and functions for Linux kernel debugging 14 import gdb namespace 21 if hasattr(gdb, 'Breakpoint'): 22 class LoadModuleBreakpoint(gdb.Breakpoint): 29 module = gdb.parse_and_eval("mod") 39 show_pagination = gdb.execute("show pagination", to_string=True) 41 gdb.execute("set pagination off") 44 gdb.write("refreshing all symbols to reload module " 51 gdb.execute("set pagination %s" % ("on" if pagination else "off")) 56 class LxSymbols(gdb [all...] |
H A D | utils.py | 2 # gdb helper commands and functions for Linux kernel debugging 14 import gdb namespace 24 gdb.events.new_objfile.disconnect(self._new_objfile_handler) 28 self._type = gdb.lookup_type(self._name) 30 raise gdb.GdbError( 32 if hasattr(gdb, 'events') and hasattr(gdb.events, 'new_objfile'): 33 gdb.events.new_objfile.connect(self._new_objfile_handler) 65 element = gdb.Value(0).cast(typeobj) 74 class ContainerOf(gdb [all...] |
H A D | slab.py | 9 import gdb namespace 34 track_type = gdb.lookup_type('struct track') 35 track_alloc = int(gdb.parse_and_eval('TRACK_ALLOC')) 36 track_free = int(gdb.parse_and_eval('TRACK_FREE')) 39 return slab.cast(gdb.lookup_type("struct folio").pointer()) 56 return cache['inuse'] + gdb.lookup_type("void").pointer().sizeof 64 p += gdb.lookup_type('struct track').sizeof * 2 118 jiffies = gdb.parse_and_eval("jiffies_64") 158 while p != gdb.Value(0): 173 track = gdb [all...] |
H A D | rbtree.py | 5 import gdb namespace 17 raise gdb.GdbError("Must be struct rb_root not {}".format(root.type)) 33 raise gdb.GdbError("Must be struct rb_root not {}".format(root.type)) 46 parent = gdb.Value(node['__rb_parent_color'] & ~3) 58 raise gdb.GdbError("Must be struct rb_node not {}".format(node.type)) 81 raise gdb.GdbError("Must be struct rb_node not {}".format(node.type)) 100 class LxRbFirst(gdb.Function): 112 raise gdb.GdbError("No entry in tree") 120 class LxRbLast(gdb.Function): 132 raise gdb [all...] |
H A D | mm.py | 9 import gdb namespace 26 raise gdb.GdbError('Only support CONFIG_SPARSEMEM_VMEMMAP now') 30 raise gdb.GdbError('Only support aarch64 now') 51 self.vabits_actual = gdb.parse_and_eval('vabits_actual') 55 self.kimage_voffset = gdb.parse_and_eval('kimage_voffset') & ((1 << 64) - 1) 71 self.SECTIONS_PER_ROOT = self.PAGE_SIZE // gdb.lookup_type("struct mem_section").sizeof 82 self.SECTION_HAS_MEM_MAP = 1 << int(gdb.parse_and_eval('SECTION_HAS_MEM_MAP_BIT')) 83 self.SECTION_IS_EARLY = 1 << int(gdb.parse_and_eval('SECTION_IS_EARLY_BIT')) 100 self.memstart_addr = gdb.parse_and_eval("memstart_addr") 102 self.vmemmap = gdb [all...] |
H A D | device.py | 5 import gdb namespace 36 for kobj in kset_for_each_object(gdb.parse_and_eval('bus_kset')): 43 for kobj in kset_for_each_object(gdb.parse_and_eval('class_kset')): 53 raise gdb.GdbError("Can't find bus type {!r}".format(name)) 60 raise gdb.GdbError("Can't find device class {!r}".format(name)) 91 gdb.write('{}dev {}:\t{}\n'.format('\t' * level, dev_name(dev), dev)) 97 class LxDeviceListBus(gdb.Command): 101 super(LxDeviceListBus, self).__init__('lx-device-list-bus', gdb.COMMAND_DATA) 106 gdb.write('bus {}:\t{}\n'.format(bus['bus']['name'].string(), bus)) 112 raise gdb [all...] |
H A D | interrupts.py | 5 import gdb namespace 18 return desc['action'] and desc['action'] == gdb.parse_and_eval("&chained_action") 26 desc = radixtree.lookup(gdb.parse_and_eval("&irq_desc_tree"), irq) 76 gdb.lookup_type("struct irqaction") 101 irq_stat = gdb.parse_and_eval("&irq_stat") 110 pvar = gdb.parse_and_eval(var) 187 text += "%*s: %10lu\n" % (prec, "ERR", gdb.parse_and_eval("irq_err_count")) 201 raise gdb.GdbError("Unsupported architecture: {}".format(target_arch)) 205 class LxInterruptList(gdb.Command): 209 super(LxInterruptList, self).__init__("lx-interruptlist", gdb [all...] |
H A D | timerlist.py | 6 import gdb namespace 23 tk_core = gdb.parse_and_eval("&tk_core") 70 jiffies = gdb.parse_and_eval("jiffies_64") 71 tick_sched_ptr = gdb.parse_and_eval("&tick_cpu_sched") 153 nr_cpu_ids = gdb.parse_and_eval("nr_cpu_ids") 155 inf = gdb.inferiors()[0] 180 class LxTimerList(gdb.Command): 184 super(LxTimerList, self).__init__("lx-timerlist", gdb.COMMAND_DATA) 187 hrtimer_bases = gdb.parse_and_eval("&hrtimer_bases") 188 max_clock_bases = gdb [all...] |
H A D | pgtable.py | 3 # gdb helper commands and functions for Linux kernel debugging 11 import gdb namespace 15 PHYSICAL_ADDRESS_MASK = gdb.parse_and_eval('0xfffffffffffff') 21 return gdb.parse_and_eval('(u64) ~0xfff') 24 return gdb.parse_and_eval('(u64) ~0x1fffff') 27 return gdb.parse_and_eval('(u64) ~0x3fffffff') 35 pob_symbol = gdb.lookup_global_symbol('page_offset_base') 37 return gdb.parse_and_eval(pob) 91 memoryview(gdb.selected_inferior().read_memory(address, 8)), 197 class TranslateVM(gdb [all...] |
H A D | radixtree.py | 12 import gdb namespace 37 raise gdb.GdbError("must be {} not {}" 74 class LxRadixTree(gdb.Function): 86 raise gdb.GdbError("No entry in tree at index {}".format(index))
|
H A D | dmesg.py | 2 # gdb helper commands and functions for Linux kernel debugging 14 import gdb namespace 26 class LxDmesg(gdb.Command): 30 super(LxDmesg, self).__init__("lx-dmesg", gdb.COMMAND_DATA) 33 inf = gdb.inferiors()[0] 36 prb_addr = int(str(gdb.parse_and_eval("(void *)'printk.c'::prb")).split()[0], 16) 141 # With python2 gdb.write will attempt to convert unicode to 145 gdb.write(msg)
|
/linux-master/scripts/gdb/ |
H A D | vmlinux-gdb.py | 2 # gdb helper commands and functions for Linux kernel debugging 16 sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)) + "/scripts/gdb") 19 gdb.parse_and_eval("0") 20 gdb.execute("", to_string=True) 22 gdb.write("NOTE: gdb 7.2 or later required for Linux helper scripts to " 27 raise gdb.GdbError("Reduced debug information will prevent GDB "
|
/linux-master/scripts/ |
H A D | Makefile | 60 subdir- += basic dtc gdb kconfig mod
|