summaryrefslogtreecommitdiff
path: root/doc/devel/debug.dox
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-03-02 19:04:49 +0000
committer <>2015-05-08 15:30:59 +0000
commitf800382616186a5d30e28d8b2c51e97a9a8360f2 (patch)
tree0d5270190548a37223d14b54383ce8a3d3af5302 /doc/devel/debug.dox
downloadisc-dhcp-tarball-master.tar.gz
Imported from /home/lorry/working-area/delta_isc-dhcp-tarball/dhcp-4.2.8.tar.gz.HEADdhcp-4.2.8master
Diffstat (limited to 'doc/devel/debug.dox')
-rw-r--r--doc/devel/debug.dox33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/devel/debug.dox b/doc/devel/debug.dox
new file mode 100644
index 0000000..f9f4696
--- /dev/null
+++ b/doc/devel/debug.dox
@@ -0,0 +1,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.
+
+*/