diff options
author | Tom de Vries <tdevries@suse.de> | 2020-11-16 10:29:36 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2020-11-30 13:44:55 +0100 |
commit | 59404f827cb1134b68dbf228d380ff86d15c9f01 (patch) | |
tree | 016ed4af96e54747e04bc60980b59ab23fe51cd6 /ylwrap | |
parent | 88b91969e1ae5d23f81b86ae6cd3c85b284c6294 (diff) | |
download | binutils-59404f827cb1134b68dbf228d380ff86d15c9f01.zip binutils-59404f827cb1134b68dbf228d380ff86d15c9f01.tar.gz binutils-59404f827cb1134b68dbf228d380ff86d15c9f01.tar.bz2 |
[gdb] Don't return non-existing path in debuginfod_source_query
When setting env var DEBUGINFOD_URLS to " " and running the testsuite, we run
into these regressions:
...
FAIL: gdb.base/list-missing-source.exp: info source
FAIL: gdb.base/source-dir.exp: info source before setting directory search list
...
Setting var DEBUGINFOD_URLS to " " allows the debuginfod query function
debuginfod_source_query to get past its early exit.
The function debuginfod_source_query is documented as: "If the file is
successfully retrieved, its path on the local machine is stored in DESTNAME".
However, in case we get back -ENOENT from libdebuginfod, we still set
DESTNAME:
....
if (fd.get () < 0 && fd.get () != -ENOENT)
printf_filtered (_("Download failed: %s. Continuing without source file %ps.\n"),
safe_strerror (-fd.get ()),
styled_string (file_name_style.style (), srcpath));
else
*destname = make_unique_xstrdup (srcpath);
return fd;
...
Fix this by making debuginfod_source_query fit it's documentation and only
setting DESTNAME when successfully retrieving a file. Likewise in
debuginfod_debuginfo_query.
gdb/ChangeLog:
2020-11-16 Tom de Vries <tdevries@suse.de>
* debuginfod-support.c (debuginfod_source_query)
(debuginfod_debuginfo_query): Only set DESTNAME if successful.
Diffstat (limited to 'ylwrap')
0 files changed, 0 insertions, 0 deletions