Bug 29316 - gdb-add-index always generates an error when libdebuginfod wasn't compiled in
Summary: gdb-add-index always generates an error when libdebuginfod wasn't compiled in
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: gdb (show other bugs)
Version: 12.1
: P2 normal
Target Milestone: ---
Assignee: Aaron Merey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-01 22:29 UTC by Mark Wielaard
Modified: 2022-07-15 21:40 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2022-07-01 22:29:05 UTC
gdb-add-index contains:

$GDB --batch -nx -iex 'set auto-load no' \
    -iex 'set debuginfod enabled off' \
    -ex "file $file" -ex "save gdb-index $dwarf5 $dir"

So it always disables debuginfod.
But gdb/debuginfod-support.c has:

/* Set callback for "set debuginfod enabled".  */ 
 
static void 
set_debuginfod_enabled (const char *value) 
{ 
#if defined(HAVE_LIBDEBUGINFOD) 
  debuginfod_enabled = value; 
#else 
  error (NO_IMPL); 
#endif 
}

So when not compiled against libdebuginfod that will always generate a error on stderr.

This causes some testcase in dwz to FAIL, because any output to stderr is seen as failure.

It also makes package build logs (if they use gdb-add-index) somewhat noisy.
Comment 1 Aaron Merey 2022-07-05 22:42:07 UTC
Patch posted to mailing list

https://sourceware.org/pipermail/gdb-patches/2022-July/190521.html
Comment 2 Aaron Merey 2022-07-15 21:40:20 UTC
Fixed in commit 92b0a182fe00