Subject: lib/13794: RES_OPTIONS=debug is broken due to res_init.o build issue
To: None <gnats-bugs@gnats.netbsd.org>
From: John Hawkinson <jhawk@mit.edu>
List: netbsd-bugs
Date: 08/27/2001 10:14:43
>Number: 13794
>Category: lib
>Synopsis: RES_OPTIONS=debug is broken due to res_init.o build issue
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 27 08:53:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: John Hawkinson
>Release: NetBSD 1.5.1
>Organization:
MIT
>Environment:
System: NetBSD zorkmid.mit.edu 1.5W NetBSD 1.5W (ZORKMID-$Revision: 1.12 $) #104: Sun Jun 24 21:48:35 EDT 2001 jhawk@zorkmid.mit.edu:/usr/local/netbsd-current/src/sys/arch/i386/compile/ZORKMID i386
>Description:
Setting "RES_OPTIONS=debug" does not work for resolver debugging.
This appears to be because, despite the fact that libresolv is built
with -DDEBUG to get this support, res_init.o, which is part of libc,
is not so-built.
>How-To-Repeat:
"env RES_OPTIONS=debug ping and.mit.edu" and watch it fail.
>Fix:
Build res_init.o with -DDEBUG. I'm not sure of the best way, though.
Setting CPPFLAGS+=-DEDBUG in src/lib/libc/Makefile would certainly do
it, but that would build other things with -DDEBUG and that is probably
undesirable.
Conversly, changing the #ifdef DEBUG to #ifdef RES_DEBUG in res_init.c
would probably complicate merging.
Perhaps setting -DRES_DEBUG in the Makefile and then adding
#ifdef RES_DEBUG
#define DEBUG
#endif
at the head of res_init.c?
Thoughts?
>Release-Note:
>Audit-Trail:
>Unformatted: