History

scripts/gdb: Perform path expansion to lx-symbol's arguments

Python doesn't do automatic expansion of paths. In case one passes path of the from ~/foo/bar the gdb scripts won't automatically expand that and as a result the symbols files won't be loaded. Fix this by explicitly expanding all paths which begin with "~"

Nikolay Borisov committed 10 years ago

Commit 552ab2a1 parent e2aa2f81 file · +1 −1Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/gdb/linux/symbols.py+1−1
@@ -153,7 +153,7 @@ lx-symbols command.""" · 152 unmodified lines
153153 saved_state['breakpoint'].enabled = saved_state['enabled']
154154
155155 def invoke(self, arg, from_tty):
156− self.module_paths = arg.split()
156+ self.module_paths = [os.path.expanduser(p) for p in arg.split()]
157157 self.module_paths.append(os.getcwd())
158158
159159 # enforce update