3 * @author Nicolas VIVIEN
6 * @note CopyRight Nicolas VIVIEN
8 * @brief COD debug file parser
9 * RIM's JDE generates several files when you build a COD application.
10 * Indeed, with the COD files for the device, we have a ".debug" file.
11 * This file is usefull to debug an application from JVM.
12 * This tool is a parser to understand these ".debug" files.
13 * Obviously, the file contents only some strings and 32 bits words.
16 * - 2009/08/01 : N. VIVIEN
20 * Copyright (C) 2009-2010, Nicolas VIVIEN
22 * This program is free software; you can redistribute it and/or modify
23 * it under the terms of the GNU General Public License as published by
24 * the Free Software Foundation; either version 2 of the License, or
25 * (at your option) any later version.
27 * This program is distributed in the hope that it will be useful,
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31 * See the GNU General Public License in the COPYING file at the
32 * root directory of this project for more details.
52 string
ParseString(istream
&input
, const int length
)
58 s
= (char *) malloc((length
+ 1) * sizeof(char));
60 for (i
=0; i
<length
; i
++) {
63 input
.read((char *) &value
, sizeof(uint16_t));
65 s
[i
] = (char) be_btohs(value
);
78 uint32_t ParseInteger(istream
&input
)
82 input
.read((char *) &value
, sizeof(uint32_t));
84 return be_btohl(value
);