Lines Matching +full:self +full:- +full:working

6 # Copyright (c) Siemens AG, 2011-2013
24 def __init__(self, spec, gdb_command): argument
25 super(LoadModuleBreakpoint, self).__init__(spec, internal=True)
26 self.silent = True
27 self.gdb_command = gdb_command
29 def stop(self): argument
32 cmd = self.gdb_command
37 # Disable pagination while reporting symbol (re-)loading.
58 """(Re-)load symbols of Linux kernel and currently loaded modules.
60 The kernel (vmlinux) is taken from the current working directly. Modules (.ko)
63 lx-symbols command."""
71 def __init__(self): argument
72 super(LxSymbols, self).__init__("lx-symbols", gdb.COMMAND_FILES,
75 def _update_module_files(self): argument
76 self.module_files = []
77 for path in self.module_paths:
82 self.module_files.append(root + "/" + name)
83 self.module_files_updated = True
85 def _get_module_file(self, module_name): argument
87 module_name.replace("_", r"[_\-]"))
88 for name in self.module_files:
93 def _section_arguments(self, module, module_addr): argument
114 args.append(" -s {name} {addr}".format(
119 def load_module_symbols(self, module): argument
123 module_file = self._get_module_file(module_name)
124 if not module_file and not self.module_files_updated:
125 self._update_module_files()
126 module_file = self._get_module_file(module_name)
137 cmdline = "add-symbol-file {filename} {sections}".format(
139 sections=self._section_arguments(module, module_addr))
141 if module_name not in self.loaded_modules:
142 self.loaded_modules.append(module_name)
146 def load_all_symbols(self): argument
162 gdb.execute("symbol-file", to_string=True)
163 gdb.execute("symbol-file {0}".format(orig_vmlinux))
165 self.loaded_modules = []
170 [self.load_module_symbols(module) for module in module_list]
175 def invoke(self, arg, from_tty): argument
176 self.module_paths = [os.path.abspath(os.path.expanduser(p))
178 self.module_paths.append(os.getcwd())
181 self.module_files = []
182 self.module_files_updated = False
184 self.load_all_symbols()
190 if self.breakpoint is not None:
191 self.breakpoint.delete()
192 self.breakpoint = None
193 self.breakpoint = LoadModuleBreakpoint(
194 "kernel/module/main.c:do_init_module", self)