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.
38 #include "dp_parser.h"
50 string
ParseString(istream
&input
, const int length
)
55 for (i
=0; i
<length
; i
++) {
58 input
.read((char *) &value
, sizeof(uint16_t));
60 str
+= (char) be_btohs(value
);
67 uint32_t ParseInteger(istream
&input
)
71 input
.read((char *) &value
, sizeof(uint32_t));
73 return be_btohl(value
);