Josh Stone <jist...@redhat.com> writes: > On 11/25/2015 04:45 AM, Ben Gamari wrote: >> This could have easily saved me three hours. >> --- >> libebl/eblopenbackend.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c >> index b301400..662842d 100644 >> --- a/libebl/eblopenbackend.c >> +++ b/libebl/eblopenbackend.c >> @@ -376,7 +376,8 @@ openbackend (Elf *elf, const char *emulation, GElf_Half >> machine) >> result->dlhandle = NULL; >> result->elf = elf; >> result->name = machines[cnt].prefix; >> - fill_defaults (result); >> + fill_defaults (result); >> + fprintf(stderr, "ebl_openbackend: Failed to find backend DSO to >> handle machine.\n"); >> >> return result; >> } > > It's not really kosher for a library to dump on stderr. No other part > of elfutils does this AFAICS. Maybe some other location needs to return > better errors from not having the ebl->dlhandle? > I can see the argument here. That being said, as a user of libdw I can attest that the debug output really could be improved. As things stand it's a nightmare trying to figure out precisely where things go off the rails, typically requiring one to literally single-step through the library in GDB until you are lucky enough to spot the error. I would really appreciate some systematic debug output, even if one needs to set a special LIBDW_DEBUG environment variable or some such to see it.
Would a patch introducing the infrastructure necessary for debug output (and a rebased version of this patch) be acceptable? > (Also, watch your tab changes.) Indeed, I've fixed my editor. Thanks, - Ben
signature.asc
Description: PGP signature