1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2K.1beta (1.48)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Debugging</TITLE>
<META NAME="description" CONTENT="Debugging">
<META NAME="keywords" CONTENT="MANUAL">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="LaTeX2HTML v2K.1beta">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="MANUAL.css">
<LINK REL="next" HREF="node46.html">
<LINK REL="previous" HREF="node42.html">
<LINK REL="up" HREF="node41.html">
<LINK REL="next" HREF="node46.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html694"
HREF="node46.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/share/latex2html/icons/next.png"></A>
<A NAME="tex2html690"
HREF="node41.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/share/latex2html/icons/up.png"></A>
<A NAME="tex2html684"
HREF="node44.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/share/latex2html/icons/prev.png"></A>
<A NAME="tex2html692"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="/usr/share/latex2html/icons/contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html695"
HREF="node46.html">Extra Macros</A>
<B> Up:</B> <A NAME="tex2html691"
HREF="node41.html">For Hackers...</A>
<B> Previous:</B> <A NAME="tex2html685"
HREF="node44.html">Explanation of Sample Keyboard</A>
  <B> <A NAME="tex2html693"
HREF="node1.html">Contents</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H1><A NAME="SECTION001120000000000000000">
Debugging</A>
</H1>
<P>
Compilation with debugging symbols is usually OFF by default. If you
would like to change that, then just add the <I>-g</I> option inside of
the CFLAGS variable in the main ``Makefile''. Different versions differ
in policy about that. Along with debugging, there is an option in the
help menu, under debugging, that is for you to be able to dump core if
you want to. That's something I've used on and off, and it can be
useful, so it was added in. I'm trying to force people to use that if
they want a corefile, since hopefully it's set up so you can't get it
to dump core any other way. :)
<P>
If you would like to compile with all debugging enabled, make sure
that the symbol ``PROD'' is <B>not</B> defined in the
Makefile, and recompile with ``make static''. (Note: Before you can
``make static'', you have to run ``make obscure'' which copies your static
libraries into the foo/ directory, where it will link against them.
If your static libraries are in different places, you'll need to copy
them into that location.) With ``make static'', GTKeyboard will compile
with static libraries, with calls like g_mem_profile() compiled in.
(You <I>did</I> compile your glib/GTK+ with memory profiling, didn't
you?) It will also print the result of various memory macros that are
located in the include/ directory in mem_header.h. This causes quite
verbose output, but in the end you get a total of how much memory has
been allocated/freed by GTKeyboard. The g_mem_profile() call of
course includes statistics on memory allocated by GTK+ as well.
<P>
Note that in the file <I>include/memheader.h</I> there are
several macros for tracking memory usage which won't really expanded
to much if debugging is not on, but if it is, sometimes to multiple
statements. Particularly the <I>glib</I> calls that end with an
underscore. Because they are multiexpression macros, you really don't
want to do something like:
<BR><I>if(mem)
<BR>
g_free_(mem);</I>
<BR>
But rather do this:
<BR><I>if(mem)
<BR> {
<BR>
g_free_(mem);
<BR> }</I>
<BR>
To account for the fact that it may or may not be a single replacement
line macro.
<P>
Also of interest to developers are the files INTERNALS and
gtkeyboard-arch.txt located in the main directory of the source tree.
They explain parts of the way the source works, to facilitate others
in hacking on GTKeyboard. At the moment, that documentation isn't
really all that great, but at least it's there, and it's something.
If you would like to see any more specific information in that
document, please write the section and submit it to <I>s2mdalle@titan.vcu.edu</I> for inclusion in the next version or let me
know and I'll do the write up myself when time becomes available.
<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html694"
HREF="node46.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="/usr/share/latex2html/icons/next.png"></A>
<A NAME="tex2html690"
HREF="node41.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="/usr/share/latex2html/icons/up.png"></A>
<A NAME="tex2html684"
HREF="node44.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="/usr/share/latex2html/icons/prev.png"></A>
<A NAME="tex2html692"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="/usr/share/latex2html/icons/contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html695"
HREF="node46.html">Extra Macros</A>
<B> Up:</B> <A NAME="tex2html691"
HREF="node41.html">For Hackers...</A>
<B> Previous:</B> <A NAME="tex2html685"
HREF="node44.html">Explanation of Sample Keyboard</A>
  <B> <A NAME="tex2html693"
HREF="node1.html">Contents</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
David Allen
2001-04-26
</ADDRESS>
</BODY>
</HTML>
|