Skip to content
Snippets Groups Projects
Commit f65d1b8c authored by Sjoerd Simons's avatar Sjoerd Simons
Browse files

Set debug-file-directory when using a sysroot


debug-file-directory is the directory where gdb goes to look for
detached debug symbols (the non buildid kind). It's interaction with the
sysroot bits are bit.. odd.. For each debug-file-directory path it will
look in ${path}/${sysroot}/<debuglink> and ${path}/debuglink, both of
which are mostly useless  for sysroots.

Explicitely set the path to ${sysroot}/usr/lib/debug to set gdb
straight.

Signed-off-by: default avatarSjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: default avatarGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Differential Revision: https://phabricator.apertis.org/D5304
parent 1cd591de
No related branches found
No related tags found
No related merge requests found
......@@ -222,6 +222,8 @@ class Debugger:
cmds = []
if isinstance(self.target, Sysroot):
cmds.append("set sysroot {}".format(self.target.path))
cmds.append("set debug-file-directory {}".format(
os.path.join(self.target.path, 'usr', 'lib', 'debug')))
cmds.append("set solib-search-path {}".format(libdir))
cmds.append("file {}{}".format(debugdir, server.app))
cmds.append("target remote {}".format(server.get_info()))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment