Page MenuHomeFreeBSD

D41653.id126728.diff
No OneTemporary

D41653.id126728.diff

diff --git a/documentation/content/en/books/porters-handbook/testing/_index.adoc b/documentation/content/en/books/porters-handbook/testing/_index.adoc
--- a/documentation/content/en/books/porters-handbook/testing/_index.adoc
+++ b/documentation/content/en/books/porters-handbook/testing/_index.adoc
@@ -628,3 +628,39 @@
....
# poudriere distclean -p portstree -y
....
+
+[[testing-debugging-ports]]
+== Debugging ports
+
+Sometimes things go wrong and the port fails at run time.
+The framework provides some facilities to help in debugging ports.
+These helpers are limited since the way of debugging a port heavily depends on
+the technology used.
+The following variables help with debugging ports:
+
+* `WITH_DEBUG`. If set, ports are built with debugging symbols.
+* `WITH_DEBUG_PORTS`. Specifies a list of ports to be built with `WITH_DEBUG` set.
+* `DEBUG_FLAGS`. Used to specify additional flags to `CFLAGS`. Defaults to `-g`.
+
+When `WITH_DEBUG` is set, either globally or for a list of ports, the resulting
+binaries are not stripped.
+
+These variables can be specified in [.filename]#make.conf# or in the command
+line:
+
+[source,shell]
+....
+# cd category/port && make -DWITH_DEBUG DEBUG_FLAGSS="-g -O0"
+....
+
+[NOTE]
+====
+If the port is built using package:ports-mgmt/poudriere[] the debugging
+variables must be specified in poudriere's [.filename]#make.conf# and not in
+[.filename]#/etc/make.conf#.
+Refer to package:ports-mgmt/poudriere[] documentation for details.
+====
+
+Please refer to the debugging information in the
+extref:{developers-handbook}[Developer's Handbook, debugging] for more details
+about the debugging tools available.

File Metadata

Mime Type
text/plain
Expires
Thu, Feb 12, 1:11 PM (20 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28666927
Default Alt Text
D41653.id126728.diff (1 KB)

Event Timeline