diff options
Diffstat (limited to 'libdwfl/find-debuginfo.c')
-rw-r--r-- | libdwfl/find-debuginfo.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libdwfl/find-debuginfo.c b/libdwfl/find-debuginfo.c index 9267788d..40857645 100644 --- a/libdwfl/find-debuginfo.c +++ b/libdwfl/find-debuginfo.c @@ -1,5 +1,5 @@ /* Standard find_debuginfo callback for libdwfl. - Copyright (C) 2005-2010, 2014, 2015 Red Hat, Inc. + Copyright (C) 2005-2010, 2014, 2015, 2019 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -359,7 +359,8 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod, other than just by finding nothing, that's all we do. */ const unsigned char *bits; GElf_Addr vaddr; - if (INTUSE(dwfl_module_build_id) (mod, &bits, &vaddr) > 0) + int bits_len; + if ((bits_len = INTUSE(dwfl_module_build_id) (mod, &bits, &vaddr)) > 0) { /* Dropping most arguments means we cannot rely on them in dwfl_build_id_find_debuginfo. But leave it that way since @@ -397,6 +398,9 @@ dwfl_standard_find_debuginfo (Dwfl_Module *mod, free (canon); } + if (fd < 0 && bits_len > 0) + fd = __libdwfl_debuginfod_find_debuginfo (mod->dwfl, bits, bits_len); + return fd; } INTDEF (dwfl_standard_find_debuginfo) |