debuggercdi/com.nokia.carbide.cpp.debug.crashdebugger/html/DebuggingInformation/CrashDebuggerUsingMAKSYM-Ref.guide.html
author timkelly
Mon, 26 Jul 2010 11:32:21 -0500
branchC3_BUILDER_WORK
changeset 1681 6636e8c75e66
parent 1024 48b401835d0a
permissions -rw-r--r--
Fix problem with sbs config xml parsing. Make sure to trim error message to avoid erroneously adding an error when there is none. Fix problem with adding system includes for variants.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     2
	"http://www.w3.org/TR/html4/loose.dtd">
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     3
	<html><head>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     4
	<title>Using the MAKSYM tool in Debugging information</title>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     5
	<link href="../../book.css" type="text/css" rel="stylesheet" >
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     6
	<link href="sysdoc-eclipse.css" type="text/css" rel="stylesheet" media="screen">
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     7
	<link href="sysdoc-eclipse.css" type="text/css" rel="stylesheet" media="print">
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     8
<div class="Head1">
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
     9
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    10
<h2>Using the MAKSYM Tool</h2>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    11
</div><div>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    12
<p>MAKSYM is a command line tool that processes the log file generated
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    13
when building a ROM image, and creates a text file that lists the address of
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    14
every global and exported function in the ROM.</p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    15
<p>Reference: tools: MAKSYM outlines
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    16
the syntax of the command.</p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    17
<p>If you know the address of the instruction which caused an exception,
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    18
you can compare this address with the MAKSYM log to see which function this is
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    19
in. You can narrow this down to the exact code within the function by using
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    20
ABLD LISTING to get the assembler output from the compiler.</p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    21
<p>The following example MAKSYM log is taken from an EKA1 build;
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    22
however, the principle is the same for EKA2.</p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    23
<p class="listing">From    \Epoc32\Release\Misa\UREL\ekern.exe<br>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    24
  <br>50003040    0094    _E32Startup<br>500030d4    002c    ImpDma::Init1(void)<br>50003100    0004    ImpDma::Init3(void)<br>50003104    0008    ImpDma::MaxBlockSize(void)</p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    25
<p>If, for example, the code address of the exception is at
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    26
0x500030dc, then you can see from the log that this is in the
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    27
ImpDma::Init1() function, at offset 8 from the start of the
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    28
function. This function is in the file
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    29
...\e32\ekern\epoc\arm\sa1100\ka_dma.cpp, so use ABLD LISTING to
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    30
obtain the assembler:</p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    31
<p class="listing">&gt; cd \e32</p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    32
<p class="listing">&gt; abld listing misa urel ekern ka_dma </p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    33
<p>Notice that you must specify the component that the file is part of,
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    34
in this case EKERN, and that you do not put the .cpp extension on
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    35
the source file name. If you do not specify a source file ABLD will create an
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    36
assembler listing for every file in component EKERN.</p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    37
<p>The listing file will be placed in the same directory as
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    38
ka_dma.cpp, and will be called ka_dma.lis. If you
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    39
look at this file you will see something like this:</p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    40
<p class="listing">7              &nbsp;Init1__6ImpDma:<br>&nbsp;&nbsp;&nbsp;8              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@ args = 0, pretend = 0, frame = 0<br>&nbsp;&nbsp;&nbsp;9              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@ frame_needed = 0, current_function_anonymous_args = 0<br>&nbsp;&nbsp;10              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;@ I don't think this function clobbers lr<br>&nbsp;&nbsp;11 0000 18209FE5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ldr&nbsp;&nbsp;&nbsp;&nbsp;r2, .L793<br>&nbsp;&nbsp;12 0004 0630A0E3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mov&nbsp;&nbsp;&nbsp;&nbsp;r3, #6<br>&nbsp;&nbsp;13 0008 003082E5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;str&nbsp;&nbsp;&nbsp;&nbsp;r3, [r2, #0]<br>&nbsp;&nbsp;14 000c 10309FE5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ldr&nbsp;&nbsp;&nbsp;&nbsp;r3, .L793+4<br>&nbsp;&nbsp;15 0010 10009FE5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ldr&nbsp;&nbsp;&nbsp;&nbsp;r0, .L793+8<br>&nbsp;&nbsp;16 0014 000083E5 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;str&nbsp;&nbsp;&nbsp;&nbsp;r0, [r3, #0]<br>&nbsp;&nbsp;17 0018 1810A0E3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mov&nbsp;&nbsp;&nbsp;&nbsp;r1, #24<br>&nbsp;&nbsp;18 001c FEFFFFEA &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b&nbsp;&nbsp;FillZ__3MemPvi</p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    41
<p>Offset 8 is the first STR instruction. Comparing this with the C++
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    42
source:</p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    43
<p class="listing">void ImpDma::Init1()<br>//<br>// Phase 1 initialisation of the Dma channels<br>//<br>&nbsp;&nbsp;&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;PP::DmaMaxChannels=KNumberOfDmaChannels;<br>&nbsp;&nbsp;&nbsp;&nbsp;PP::DmaChannelTable=(TDma **)(&amp;DmaChannels[0]);<br>&nbsp;&nbsp;&nbsp;&nbsp;Mem::FillZ(PP::DmaChannelTable,sizeof(TDma *)*KNumberOfDmaChannels);<br>&nbsp;&nbsp;&nbsp;&nbsp;}</p>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    44
<p>The first store is to PP::DmaMaxChannels, so clearly there is a
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    45
problem writing this memory. </p> 
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    46
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    47
	   </div>
1024
48b401835d0a synched 2.5 and 3.0 pages
fturovic <frank.turovich@nokia.com>
parents: 0
diff changeset
    48
<div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>
0
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    49
	   </body>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    50
	   </html>
fb279309251b DP tools release version Revision: 200912
Deepak Modgil <Deepak.Modgil@Nokia.com>
parents:
diff changeset
    51