Skip to content

Commit 493d4ee

Browse files
committed
revert "scripts/gdb/symbols: add specific ko module load command"
Revert 11f9565 ("scripts/gdb/symbols: add specific ko module load command") due to breakage identified by Johannes Berg in [1]. Fixes: 11f9565 ("scripts/gdb/symbols: add specific ko module load command") Reported-by: Johannes Berg <johannes@sipsolutions.net> Closes: https://lkml.kernel.org/r/c44b748307a074d0c250002cdcfe209b8cce93c9.camel@sipsolutions.net [1] Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cc: Chinwen Chang <chinwen.chang@mediatek.com> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Kieran Bingham <kbingham@kernel.org> Cc: Kuan-Ying Lee <Kuan-Ying.Lee@mediatek.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: Qun-Wei Lin <qun-wei.lin@mediatek.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent c652df8 commit 493d4ee

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

scripts/gdb/linux/symbols.py

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,11 @@ def _section_arguments(self, module, module_addr):
111111
return "{textaddr} {sections}".format(
112112
textaddr=textaddr, sections="".join(args))
113113

114-
def load_module_symbols(self, module, module_file=None):
114+
def load_module_symbols(self, module):
115115
module_name = module['name'].string()
116116
module_addr = str(module['mem'][constants.LX_MOD_TEXT]['base']).split()[0]
117117

118-
if not module_file:
119-
module_file = self._get_module_file(module_name)
118+
module_file = self._get_module_file(module_name)
120119
if not module_file and not self.module_files_updated:
121120
self._update_module_files()
122121
module_file = self._get_module_file(module_name)
@@ -139,19 +138,6 @@ def load_module_symbols(self, module, module_file=None):
139138
else:
140139
gdb.write("no module object found for '{0}'\n".format(module_name))
141140

142-
def load_ko_symbols(self, mod_path):
143-
self.loaded_modules = []
144-
module_list = modules.module_list()
145-
146-
for module in module_list:
147-
module_name = module['name'].string()
148-
module_pattern = ".*/{0}\.ko(?:.debug)?$".format(
149-
module_name.replace("_", r"[_\-]"))
150-
if re.match(module_pattern, mod_path) and os.path.exists(mod_path):
151-
self.load_module_symbols(module, mod_path)
152-
return
153-
raise gdb.GdbError("%s is not a valid .ko\n" % mod_path)
154-
155141
def load_all_symbols(self):
156142
gdb.write("loading vmlinux\n")
157143

@@ -190,11 +176,6 @@ def invoke(self, arg, from_tty):
190176
self.module_files = []
191177
self.module_files_updated = False
192178

193-
argv = gdb.string_to_argv(arg)
194-
if len(argv) == 1:
195-
self.load_ko_symbols(argv[0])
196-
return
197-
198179
self.load_all_symbols()
199180

200181
if hasattr(gdb, 'Breakpoint'):

0 commit comments

Comments
 (0)