Skip to content

Commit

Permalink
scripts/gdb: Perform path expansion to lx-symbol's arguments
Browse files Browse the repository at this point in the history
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 "~"

Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Nikolay Borisov <[email protected]>
Signed-off-by: Kieran Bingham <[email protected]>
Reviewed-by: Jan Kiszka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Nikolay Borisov authored and torvalds committed Jul 15, 2016
1 parent e2aa2f8 commit 552ab2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/gdb/linux/symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def load_all_symbols(self):
saved_state['breakpoint'].enabled = saved_state['enabled']

def invoke(self, arg, from_tty):
self.module_paths = arg.split()
self.module_paths = [os.path.expanduser(p) for p in arg.split()]
self.module_paths.append(os.getcwd())

# enforce update
Expand Down

0 comments on commit 552ab2a

Please sign in to comment.