- DBGKD_WAIT_STATE_CHANGE64 is used in KD protocol 5, not number 6 that we use. Proto...
[reactos.git] / reactos / lib / rossym / getraw.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: lib/rossym/getraw.c
5 * PURPOSE: Convert rossym info to raw external format
6 *
7 * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com)
8 */
9
10 #define NTOSAPI
11 #include <ntddk.h>
12 #include <reactos/rossym.h>
13 #include "rossympriv.h"
14
15 #define NDEBUG
16 #include <debug.h>
17
18 ULONG
19 RosSymGetRawDataLength(PROSSYM_INFO RosSymInfo)
20 {
21 return sizeof(ROSSYM_HEADER)
22 + RosSymInfo->SymbolsCount * sizeof(ROSSYM_ENTRY)
23 + RosSymInfo->StringsLength;
24 }
25
26 VOID
27 RosSymGetRawData(PROSSYM_INFO RosSymInfo, PVOID RawData)
28 {
29 PROSSYM_HEADER RosSymHeader;
30
31 RosSymHeader = (PROSSYM_HEADER) RawData;
32 RosSymHeader->SymbolsOffset = sizeof(ROSSYM_HEADER);
33 RosSymHeader->SymbolsLength = RosSymInfo->SymbolsCount * sizeof(ROSSYM_ENTRY);
34 RosSymHeader->StringsOffset = RosSymHeader->SymbolsOffset + RosSymHeader->SymbolsLength;
35 RosSymHeader->StringsLength = RosSymInfo->StringsLength;
36
37 memcpy((char *) RawData + RosSymHeader->SymbolsOffset, RosSymInfo->Symbols,
38 RosSymHeader->SymbolsLength);
39 memcpy((char *) RawData + RosSymHeader->StringsOffset, RosSymInfo->Strings,
40 RosSymHeader->StringsLength);
41 }
42
43 /* EOF */