All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxl/Makefile: Don't optimize debug builds; add macro debugging information
@ 2014-12-01 10:39 Euan Harris
  2014-12-01 11:43 ` Ian Campbell
  0 siblings, 1 reply; 31+ messages in thread
From: Euan Harris @ 2014-12-01 10:39 UTC (permalink / raw)
  To: xen-devel; +Cc: Euan Harris, Ian.Jackson

libxl debug builds are built with optimization level -O1, inherited from
the CFLAGS definition in StdGNU.mk.   Optimizations confuse the debugger,
and the comment justifying -O1 in StdGNU.mk should not apply for a
userspace library.   Disable optimization by appending -O0 to CFLAGS,
which overrides the -O1 flag specified earlier.

Also specify -g3, to add macro debugging information which allows
gdb to expand macro invocations.   This is useful as libxl uses many
non-trivial macros.

Signed-off-by: Euan Harris <euan.harris@citrix.com>
---
 tools/libxl/Makefile |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index df08c8a..26d8679 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -15,6 +15,12 @@ CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
 	-Wno-declaration-after-statement -Wformat-nonliteral
 CFLAGS += -I. -fPIC
 
+ifeq ($(debug),y)
+# Disable optimizations and debugging information for macros
+CFLAGS += -O0 -g3
+endif
+
+
 ifeq ($(CONFIG_Linux),y)
 LIBUUID_LIBS += -luuid
 endif
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2015-02-04 16:42 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-01 10:39 [PATCH] libxl/Makefile: Don't optimize debug builds; add macro debugging information Euan Harris
2014-12-01 11:43 ` Ian Campbell
2014-12-01 11:55   ` Euan Harris
2014-12-01 12:12     ` Ian Campbell
2014-12-01 14:21       ` [PATCH v2] tools/Rules.mk: " Euan Harris
2015-01-08 17:16         ` Ian Campbell
2015-01-12 16:42           ` Ian Campbell
2015-01-13  5:52         ` Wen Congyang
2015-01-13 10:11           ` Ian Campbell
2015-01-13 10:38             ` Wen Congyang
2015-01-13 11:17             ` Wen Congyang
2015-01-13 11:30               ` Ian Campbell
2015-01-15  3:38                 ` Wen Congyang
2015-01-15  3:39         ` [PATCH] Fix building error Wen Congyang
2015-01-15  7:57           ` Olaf Hering
2015-01-15  9:04             ` Wen Congyang
2015-01-15  9:21               ` Olaf Hering
2015-01-15  9:28                 ` Wen Congyang
2015-01-15  9:33                   ` [PATCH v2] " Wen Congyang
2015-01-15 11:26                     ` Ian Jackson
2015-01-19 15:23                       ` Ian Campbell
2015-01-20  2:21                         ` Wen Congyang
2015-01-20 10:18                           ` Ian Campbell
2015-01-20 10:39                             ` Wen Congyang
2015-01-20 12:47                         ` Olaf Hering
2015-01-23 11:34                         ` Julien Grall
2015-02-04 15:37                       ` Jan Beulich
2015-02-04 15:43                         ` Ian Jackson
2015-02-04 16:02                           ` Jan Beulich
2015-02-04 16:10                             ` Ian Jackson
2015-02-04 16:42                         ` Olaf Hering

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.