Debugger: Don't add empty path components to solib-search-path

Change-Id: I417e5193749dae44d189fc0189a92899d738976b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-08-03 08:40:56 +02:00
parent 82340dbf73
commit adf70fd8f2

View File

@@ -1165,7 +1165,8 @@ class Dumper(DumperBase):
def appendSolibSearchPath(self, args):
new = list(map(self.hexdecode, args['path']))
old = [gdb.parameter('solib-search-path')]
gdb.execute('set solib-search-path %s' % args['separator'].join(old + new))
joined = os.pathsep.join([item for item in old + new if item != ''])
gdb.execute('set solib-search-path %s' % joined)
def watchPoint(self, args):
self.reportToken(args)