head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.1
	netbsd-11-0-RC3:1.1.1.1
	netbsd-11-0-RC2:1.1.1.1
	netbsd-11-0-RC1:1.1.1.1
	perseant-exfatfs-base-20250801:1.1.1.1
	netbsd-11:1.1.1.1.0.18
	netbsd-11-base:1.1.1.1
	netbsd-10-1-RELEASE:1.1.1.1
	perseant-exfatfs-base-20240630:1.1.1.1
	perseant-exfatfs:1.1.1.1.0.16
	perseant-exfatfs-base:1.1.1.1
	netbsd-9-4-RELEASE:1.1.1.1
	netbsd-10-0-RELEASE:1.1.1.1
	netbsd-10-0-RC6:1.1.1.1
	netbsd-10-0-RC5:1.1.1.1
	netbsd-10-0-RC4:1.1.1.1
	netbsd-10-0-RC3:1.1.1.1
	netbsd-10-0-RC2:1.1.1.1
	netbsd-10-0-RC1:1.1.1.1
	netbsd-10:1.1.1.1.0.14
	netbsd-10-base:1.1.1.1
	netbsd-9-3-RELEASE:1.1.1.1
	DHCP4_4_3:1.1.1.1
	cjep_sun2x-base1:1.1.1.1
	cjep_sun2x:1.1.1.1.0.12
	cjep_sun2x-base:1.1.1.1
	cjep_staticlib_x-base1:1.1.1.1
	DHCP4_4_2_P1:1.1.1.1
	netbsd-9-2-RELEASE:1.1.1.1
	cjep_staticlib_x:1.1.1.1.0.10
	cjep_staticlib_x-base:1.1.1.1
	netbsd-9-1-RELEASE:1.1.1.1
	DHCP4_4_2:1.1.1.1
	phil-wifi-20200421:1.1.1.1
	phil-wifi-20200411:1.1.1.1
	is-mlppp:1.1.1.1.0.8
	is-mlppp-base:1.1.1.1
	phil-wifi-20200406:1.1.1.1
	netbsd-9-0-RELEASE:1.1.1.1
	netbsd-9-0-RC2:1.1.1.1
	netbsd-9-0-RC1:1.1.1.1
	phil-wifi-20191119:1.1.1.1
	netbsd-9:1.1.1.1.0.6
	netbsd-9-base:1.1.1.1
	phil-wifi-20190609:1.1.1.1
	pgoyette-compat-merge-20190127:1.1.1.1.2.2
	pgoyette-compat-20190127:1.1.1.1
	pgoyette-compat-20190118:1.1.1.1
	pgoyette-compat-1226:1.1.1.1
	pgoyette-compat-1126:1.1.1.1
	pgoyette-compat-1020:1.1.1.1
	pgoyette-compat-0930:1.1.1.1
	pgoyette-compat-0906:1.1.1.1
	pgoyette-compat-0728:1.1.1.1
	phil-wifi:1.1.1.1.0.4
	phil-wifi-base:1.1.1.1
	pgoyette-compat-0625:1.1.1.1
	pgoyette-compat-0521:1.1.1.1
	pgoyette-compat-0502:1.1.1.1
	pgoyette-compat-0422:1.1.1.1
	pgoyette-compat:1.1.1.1.0.2
	pgoyette-compat-0415:1.1.1.1
	DHCP4_4_1:1.1.1.1
	ISC:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2018.04.07.22.34.25;	author christos;	state Exp;
branches
	1.1.1.1;
next	;
commitid	ZVMAguZtny6GRyxA;

1.1.1.1
date	2018.04.07.22.34.25;	author christos;	state Exp;
branches
	1.1.1.1.2.1;
next	;
commitid	ZVMAguZtny6GRyxA;

1.1.1.1.2.1
date	2018.04.07.22.34.25;	author pgoyette;	state dead;
branches;
next	1.1.1.1.2.2;
commitid	qk3nktk0szmTIByA;

1.1.1.1.2.2
date	2018.04.16.01.59.47;	author pgoyette;	state Exp;
branches;
next	;
commitid	qk3nktk0szmTIByA;


desc
@@


1.1
log
@Initial revision
@
text
@/**
 @@page debug Debugging
 This page enumerates various techniques useful for debugging ISC DHCP software.

 @@section debugTips Debugging Tips & Tricks

ISC DHCP code is somewhat convoluted. Due to extensive macros use, it is often
difficult to even find whole function, much less to understand what they
actually do. One way to find such a macro-defined function is to compile the
code with debugging symbols (-g), load the binary into gdb and set a breakpoint
for such a function. gdb will print out exact place in the code where the
function is defined. Presumably one will find a macro at that specific location.
For example to find where \ref lease_reference function is defined do:

@@verbatim
gdb
file dhcpd
b lease_reference
@@endverbatim

DEBUG_MEMORY_LEAKAGE may be defined in includes/site.h to enable some debugging
code to help with debugging memory issues.  This code keeps a running total
of the outstanding memory that has been allocated and a list of the outstanding
allocations.  Both are updated whent he memory is freed.  Status information is
printed when do_packet() and do_packet6() complete processing.  The outstanding
value is expected to grow when new structures are used - for example when a new
IPv6 lease is created.  It is not expected to grow when a structure is reused
for example when an IPv6 lease is renewed.

DEBUG_RC_HISTORY and DEBUG_RC_HISTORY_EXHAUSTIVELY can also be defined to provide
more verbose information about reference counts on objects.

*/
@


1.1.1.1
log
@import dhcp-4.4.1
@
text
@@


1.1.1.1.2.1
log
@file debug.dox was added on branch pgoyette-compat on 2018-04-16 01:59:47 +0000
@
text
@d1 33
@


1.1.1.1.2.2
log
@Sync with HEAD, resolve some conflicts
@
text
@a0 33
/**
 @@page debug Debugging
 This page enumerates various techniques useful for debugging ISC DHCP software.

 @@section debugTips Debugging Tips & Tricks

ISC DHCP code is somewhat convoluted. Due to extensive macros use, it is often
difficult to even find whole function, much less to understand what they
actually do. One way to find such a macro-defined function is to compile the
code with debugging symbols (-g), load the binary into gdb and set a breakpoint
for such a function. gdb will print out exact place in the code where the
function is defined. Presumably one will find a macro at that specific location.
For example to find where \ref lease_reference function is defined do:

@@verbatim
gdb
file dhcpd
b lease_reference
@@endverbatim

DEBUG_MEMORY_LEAKAGE may be defined in includes/site.h to enable some debugging
code to help with debugging memory issues.  This code keeps a running total
of the outstanding memory that has been allocated and a list of the outstanding
allocations.  Both are updated whent he memory is freed.  Status information is
printed when do_packet() and do_packet6() complete processing.  The outstanding
value is expected to grow when new structures are used - for example when a new
IPv6 lease is created.  It is not expected to grow when a structure is reused
for example when an IPv6 lease is renewed.

DEBUG_RC_HISTORY and DEBUG_RC_HISTORY_EXHAUSTIVELY can also be defined to provide
more verbose information about reference counts on objects.

*/
@


