The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/1576

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Add variable `DEBUG' that can be used to specify debug flags for the Go
tool when building either the client or the lxd.

For example:

 $ DEBUG='-gcflags "-N -l"' make

The -N flag enables debug information and -l disables compiler inlining.
Example of how to debug using lldb can be found here:

 http://ribrdb.github.io/lldb/

 http://blog.ralch.com/tutorial/golang-debug-with-lldb/

Signed-off-by: Andrew McDermott <[email protected]>
From 2bedd98d2a094b33866d4a39e05f76f5abbcef49 Mon Sep 17 00:00:00 2001
From: Andrew McDermott <[email protected]>
Date: Mon, 8 Feb 2016 21:56:49 +0000
Subject: [PATCH] Makefile: allow debug info to be specified

Add variable `DEBUG' that can be used to specify debug flags for the Go
tool when building either the client or the lxd.

For example:

 $ DEBUG='-gcflags "-N -l"' make

The -N flag enables debug information and -l disables compiler inlining.
Example of how to debug using lldb can be found here:

 http://ribrdb.github.io/lldb/

 http://blog.ralch.com/tutorial/golang-debug-with-lldb/

Signed-off-by: Andrew McDermott <[email protected]>
---
 Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 4e7c957..b534770 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ default:
        # Must run twice due to go get race
        -go get -t -v -d ./...
        -go get -t -v -d ./...
-       go install -v ./...
+       go install -v $(DEBUG) ./...
        @echo "LXD built succesfuly"
 
 .PHONY: client
@@ -23,7 +23,7 @@ client:
        # Must run twice due to go get race
        -go get -t -v -d ./...
        -go get -t -v -d ./...
-       go install -v ./lxc
+       go install -v $(DEBUG) ./lxc
        @echo "LXD client built succesfuly"
 
 .PHONY: update
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to