Skip to main content
summaryrefslogtreecommitdiffstats
blob: d36b21f521cf929ad67351ba7903fb987e9fbff3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*******************************************************************************
 * Copyright (c) 2007, 2013 Wind River Systems, Inc. and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * and Eclipse Distribution License v1.0 which accompany this distribution.
 * The Eclipse Public License is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * and the Eclipse Distribution License is available at
 * http://www.eclipse.org/org/documents/edl-v10.php.
 * You may elect to redistribute this code under either of these licenses.
 *
 * Contributors:
 *     Wind River Systems - initial API and implementation
 *******************************************************************************/

/*
 * Symbols service.
 */

#ifndef D_linenumbersMux
#define D_linenumbersMux

#include <tcf/framework/context.h>
#include <tcf/framework/protocol.h>

#if ENABLE_LineNumbersMux

#include <tcf/services/linenumbers.h>

typedef struct LineNumbersReader {
    int (*line_to_address)(Context * ctx, char * file, int line, int column,
            LineNumbersCallBack * client, void * args);
    int (*address_to_line)(Context * ctx, ContextAddress addr0, ContextAddress addr1,
            LineNumbersCallBack * client, void * args);
    unsigned reader_index;
} LineNumbersReader;

#ifdef LINENUMBERS_READER_PREFIX
#define JOIN(a,b) JOIN1(a,b)
#define JOIN1(a,b) a##b
#define READER_NAME(name)  JOIN(LINENUMBERS_READER_PREFIX,name)


#define line_to_address READER_NAME(line_to_address)
#define address_to_line READER_NAME(address_to_line)
#define ini_line_numbers_lib READER_NAME(ini_line_numbers_lib)

extern int line_to_address(Context * ctx, char * file, int line, int column, LineNumbersCallBack * client, void * args);
extern int address_to_line(Context * ctx, ContextAddress addr0, ContextAddress addr1, LineNumbersCallBack * client, void * args);
extern void ini_line_numbers_lib(void);

static LineNumbersReader line_numbers_reader = { line_to_address, address_to_line};
#else  /* SYM_READER_PREFIX */
extern void elf_reader_ini_line_numbers_lib();
extern void win32_reader_ini_line_numbers_lib();
#endif  /* SYM_READER_PREFIX */

extern int add_line_numbers_reader(LineNumbersReader * reader);

#endif /* ENABLE_LineNumbersMux */

#endif /* D_linenumbersMux */

Back to the top