diff options
Diffstat (limited to 'scripts/gdb/linux/symbols.py')
| -rw-r--r-- | scripts/gdb/linux/symbols.py | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py index 004b0ac7fa72..2f5b95f09fa0 100644 --- a/scripts/gdb/linux/symbols.py +++ b/scripts/gdb/linux/symbols.py | |||
| @@ -139,8 +139,12 @@ lx-symbols command.""" | |||
| 139 | saved_states.append({'breakpoint': bp, 'enabled': bp.enabled}) | 139 | saved_states.append({'breakpoint': bp, 'enabled': bp.enabled}) | 
| 140 | 140 | ||
| 141 | # drop all current symbols and reload vmlinux | 141 | # drop all current symbols and reload vmlinux | 
| 142 | orig_vmlinux = 'vmlinux' | ||
| 143 | for obj in gdb.objfiles(): | ||
| 144 | if obj.filename.endswith('vmlinux'): | ||
| 145 | orig_vmlinux = obj.filename | ||
| 142 | gdb.execute("symbol-file", to_string=True) | 146 | gdb.execute("symbol-file", to_string=True) | 
| 143 | gdb.execute("symbol-file vmlinux") | 147 | gdb.execute("symbol-file {0}".format(orig_vmlinux)) | 
| 144 | 148 | ||
| 145 | self.loaded_modules = [] | 149 | self.loaded_modules = [] | 
| 146 | module_list = modules.module_list() | 150 | module_list = modules.module_list() | 
