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
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HTML>
<HEAD>
<TITLE>Crystal Space: Memory Debugger mapfile</TITLE>
<META NAME="description" CONTENT="Crystal Space: Memory Debugger mapfile">
<META NAME="keywords" CONTENT="Crystal Space: Memory Debugger mapfile">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC635"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_268.html#SEC634"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_270.html#SEC636"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_263.html#SEC629"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_267.html#SEC633"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_271.html#SEC637"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<HR SIZE=1>
<H3> 8.4.2 Map File Format </H3>
<!--docid::SEC635::-->
<P>
Map file has a very simple format. Currently the map file is created by
piping output from the `<TT>nm</TT>' program through an AWK script, but you
can write other tools that create `<TT>.map</TT>' files. That's why I'll describe
the format of map file in details. Even more details you can gather from the
source code, as always.
</P><P>
The map file is a plain text file. Lines that start with `<SAMP>#</SAMP>' or `<SAMP>;</SAMP>'
are ignored. Otherwise each line starts with an letter that identifies which
type of information is presented on that line. Here is a list of all
identificators, what they mean, and what information is expected on that line.
</P><P>
<DL COMPACT>
<DT><CODE>O <VAR>string</VAR></CODE>
<DD>Memory Debugger [O]ptions. Example:
<P>
<TABLE><tr><td> </td><td class=example><pre>O aslbL
</pre></td></tr></table></P><P>
<DT><CODE>S <VAR>hexnum</VAR> <VAR>string</VAR></CODE>
<DD>[S]ource module start. The <VAR>hexnum</VAR> parameter defines the start address
of the object module in hexadecimal; the <VAR>string</VAR> is just the source file
name. Example:
<P>
<TABLE><tr><td> </td><td class=example><pre>S 10038 /home/andy/CS/memdbg/test.cpp
</pre></td></tr></table></P><P>
<DT><CODE>F <VAR>hexnum</VAR> <VAR>string</VAR></CODE>
<DD>[F]unction start. The <VAR>hexnum</VAR> parameter defines the hexadecimal function
address; the <VAR>string</VAR> is the function name. Example:
<P>
<TABLE><tr><td> </td><td class=example><pre>F 10370 output(char const*,...)
</pre></td></tr></table></P><P>
<DT><CODE>L <VAR>hexnum</VAR> <VAR>decnum</VAR></CODE>
<DD>This denotes a [L]ine number. The <VAR>hexnum</VAR> parameter is the hexadecimal
address of the line, the <VAR>decnum</VAR> is the line number (in decimal).
Example:
<P>
<TABLE><tr><td> </td><td class=example><pre>L 10071 11
</pre></td></tr></table></P><P>
<DT><CODE>D <VAR>hexnum-a</VAR> <VAR>hexnum-b</VAR> A|F</CODE>
<DD>This command is for advanced users only. It is not written by
`<TT>memdbg.sh</TT>' script, and is inserted manually by you using an editor. The
first hexadecimal number (<VAR>hexnum-a</VAR>) is the address of memory block, the
second (<VAR>hexnum-b</VAR>) is the address inside your executable. The literal
flag `<SAMP>A</SAMP>' or `<SAMP>F</SAMP>' means to invoke a debug breakpoint either during
allocation of deallocation (freeing) of that block. On Intel x86 architecture
this is the `<SAMP>int 3</SAMP>' instruction. This feature can be used to track very
specific bugs. Example:
<P>
<TABLE><tr><td> </td><td class=example><pre>D 32b70 10370 A
</pre></td></tr></table></DL>
<P>
The addresses for the `<SAMP>S</SAMP>', `<SAMP>F</SAMP>', and `<SAMP>L</SAMP>' keywords should be
sorted in increasing order; i.e. the memory debugger supposes that all lines
are pre-sorted by increasing value of their address. Otherwise you will get
very strange line references (or hexadecimal addresses like at the end of
previous section).
</P><P>
<A NAME="Memory Debugger Internals"></A>
<HR SIZE=1>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_268.html#SEC634"> < </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_270.html#SEC636"> > </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_263.html#SEC629"> << </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_267.html#SEC633"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_271.html#SEC637"> >> </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT"> <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="index.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_285.html#SEC711">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="cs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>
|