2
|
1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
|
2 |
"http://www.w3.org/TR/html4/loose.dtd">
|
|
3 |
<html><head>
|
|
4 |
<title>Using the MAKSYM tool in Debugging information</title>
|
|
5 |
<link href="../../book.css" type="text/css" rel="stylesheet" >
|
|
6 |
<link href="sysdoc-eclipse.css" type="text/css" rel="stylesheet" media="screen">
|
|
7 |
<link href="sysdoc-eclipse.css" type="text/css" rel="stylesheet" media="print">
|
|
8 |
<div class="Head1">
|
|
9 |
|
|
10 |
<h2>Using the MAKSYM Tool</h2>
|
|
11 |
</div><div>
|
|
12 |
<p>MAKSYM is a command line tool that processes the log file generated
|
|
13 |
when building a ROM image, and creates a text file that lists the address of
|
|
14 |
every global and exported function in the ROM.</p>
|
|
15 |
<p>Reference: tools: MAKSYM outlines
|
|
16 |
the syntax of the command.</p>
|
|
17 |
<p>If you know the address of the instruction which caused an exception,
|
|
18 |
you can compare this address with the MAKSYM log to see which function this is
|
|
19 |
in. You can narrow this down to the exact code within the function by using
|
|
20 |
ABLD LISTING to get the assembler output from the compiler.</p>
|
|
21 |
<p>The following example MAKSYM log is taken from an EKA1 build;
|
|
22 |
however, the principle is the same for EKA2.</p>
|
|
23 |
<p class="listing">From \Epoc32\Release\Misa\UREL\ekern.exe<br>
|
|
24 |
<br>50003040 0094 _E32Startup<br>500030d4 002c ImpDma::Init1(void)<br>50003100 0004 ImpDma::Init3(void)<br>50003104 0008 ImpDma::MaxBlockSize(void)</p>
|
|
25 |
<p>If, for example, the code address of the exception is at
|
|
26 |
0x500030dc, then you can see from the log that this is in the
|
|
27 |
ImpDma::Init1() function, at offset 8 from the start of the
|
|
28 |
function. This function is in the file
|
|
29 |
...\e32\ekern\epoc\arm\sa1100\ka_dma.cpp, so use ABLD LISTING to
|
|
30 |
obtain the assembler:</p>
|
|
31 |
<p class="listing">> cd \e32</p>
|
|
32 |
<p class="listing">> abld listing misa urel ekern ka_dma </p>
|
|
33 |
<p>Notice that you must specify the component that the file is part of,
|
|
34 |
in this case EKERN, and that you do not put the .cpp extension on
|
|
35 |
the source file name. If you do not specify a source file ABLD will create an
|
|
36 |
assembler listing for every file in component EKERN.</p>
|
|
37 |
<p>The listing file will be placed in the same directory as
|
|
38 |
ka_dma.cpp, and will be called ka_dma.lis. If you
|
|
39 |
look at this file you will see something like this:</p>
|
|
40 |
<p class="listing">7 Init1__6ImpDma:<br> 8 @ args = 0, pretend = 0, frame = 0<br> 9 @ frame_needed = 0, current_function_anonymous_args = 0<br> 10 @ I don't think this function clobbers lr<br> 11 0000 18209FE5 ldr r2, .L793<br> 12 0004 0630A0E3 mov r3, #6<br> 13 0008 003082E5 str r3, [r2, #0]<br> 14 000c 10309FE5 ldr r3, .L793+4<br> 15 0010 10009FE5 ldr r0, .L793+8<br> 16 0014 000083E5 str r0, [r3, #0]<br> 17 0018 1810A0E3 mov r1, #24<br> 18 001c FEFFFFEA b FillZ__3MemPvi</p>
|
|
41 |
<p>Offset 8 is the first STR instruction. Comparing this with the C++
|
|
42 |
source:</p>
|
|
43 |
<p class="listing">void ImpDma::Init1()<br>//<br>// Phase 1 initialisation of the Dma channels<br>//<br> {<br> PP::DmaMaxChannels=KNumberOfDmaChannels;<br> PP::DmaChannelTable=(TDma **)(&DmaChannels[0]);<br> Mem::FillZ(PP::DmaChannelTable,sizeof(TDma *)*KNumberOfDmaChannels);<br> }</p>
|
|
44 |
<p>The first store is to PP::DmaMaxChannels, so clearly there is a
|
|
45 |
problem writing this memory. </p>
|
|
46 |
|
|
47 |
</div>
|
|
48 |
<div id="footer">Copyright © 2009 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>
|
|
49 |
</body>
|
|
50 |
</html>
|
|
51 |
|