GEL  0.99
stabs.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * GEL is part of the GEL library.
5  * Copyright (c) 2011, IRIT- UPS
6  *
7  * GEL is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * GEL is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GEL; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 #ifndef GEL_STABS_H_
22 #define GEL_STABS_H_
23 
24 #include <stdint.h>
25 #include <gel/gel.h>
26 #include <gel/debug_line.h>
27 
29 
30 /* sections */
31 #define STABS_SECT_STAB ".stab"
32 #define STABS_SECT_STABSTR ".stabstr"
33 
34 /* symbols */
35 #define N_UNDF 0x00
36 #define N_GSYM 0x20
37 #define N_FUN 0x24
38 #define N_OUTL 0x25
39 #define N_STSYM 0x26
40 #define N_TSTSYM 0x27
41 #define N_LCSYM 0x28
42 #define N_MAIN 0x2a
43 #define N_ROSYM 0x2c
44 #define N_FLSYM 0x2e
45 #define N_TFLSYM 0x2f
46 #define N_CMDLINE 0x34
47 #define N_OBJ 0x38
48 #define N_OPT 0x3c
49 #define N_RSYM 0x40
50 #define N_SLINE 0x44
51 #define N_XLINE 0x45
52 #define N_BROWS 0x48
53 #define N_ILDPAD 0x4c
54 #define N_ENDM 0x62
55 #define N_SO 0x64
56 #define N_MOD 0x66
57 #define N_EMOD 0x68
58 #define N_READ_MOD 0x6a
59 #define N_ALIAS 0x6c
60 #define N_LSYM 0x80
61 #define N_BINCL 0x82
62 #define N_SOL 0x84
63 #define N_PSYM 0xa0
64 #define N_EINCL 0xa2
65 #define N_ENTRY 0xa4
66 #define N_LBRAC 0xc0
67 #define N_USING 0xc4
68 #define N_ISYM 0xc6
69 #define N_ESYM 0xc8
70 #define N_PATCH 0xd0
71 #define N_CONSTRUCT 0xd2
72 #define N_DESTRUCT 0xd4
73 #define N_CODETAG 0xd8
74 #define N_FUN_CHILD 0xd9
75 #define N_RBRAC 0xe0
76 #define N_BCOMM 0xe2
77 #define N_TCOMM 0xe3
78 #define N_ECOMM 0xe4
82 typedef struct stab_t {
83  const char *n_strx;
84  uint8_t n_type;
85  int8_t n_other;
86  int16_t n_desc;
87  uint32_t n_value;
89 
91 typedef struct stabs_t stabs_t;
92 
93 /* stabs errors */
94 #define STABS_ERR_BASE (-256)
95 #define STABS_ERR_NONE (-256)
96 #define STABS_ERR_NOSTR (-258)
97 #define STABS_ERR_NORES (-260)
98 #define STABS_ERR_FMT (-262)
100 /* functions */
102 void stabs_delete(stabs_t *stabs);
103 const char *stabs_strerror(void);
104 int stabs_count(stabs_t *stabs);
105 stab_t *stabs_item(stabs_t *stabs, int i);
107 
109 
110 #endif /* GEL_STABS_H_ */
#define __END_DECLS
Definition: common.h:29
#define __BEGIN_DECLS
Definition: common.h:28
struct stabs_t stabs_t
Definition: stabs.h:91
struct stab_t stab_t
stab_t * stabs_item(stabs_t *stabs, int i)
Definition: stabs.c:155
stabs_t * stabs_new(gel_file_t *file)
Definition: stabs.c:68
void stabs_delete(stabs_t *stabs)
Definition: stabs.c:133
gel_line_map_t * stabs_new_line_map(gel_file_t *file)
Definition: stabs.c:370
const char * stabs_strerror(void)
int stabs_count(stabs_t *stabs)
Definition: stabs.c:144
Definition: file.h:31
Definition: debug.h:67
Definition: stabs.h:82
uint32_t n_value
Definition: stabs.h:87
int16_t n_desc
Definition: stabs.h:86
int8_t n_other
Definition: stabs.h:85
const char * n_strx
Definition: stabs.h:83
uint8_t n_type
Definition: stabs.h:84