6 // STABS debugging info
8 // The JOS kernel debugger can understand some debugging information
9 // in the STABS format. For more information on this format, see
10 // http://sources.redhat.com/gdb/onlinedocs/stabs_toc.html
12 // The constants below define some symbol types used by various debuggers
13 // and compilers. JOS uses the N_SO, N_SOL, N_FUN, and N_SLINE types.
15 #define N_GSYM 0x20 // global symbol
16 #define N_FNAME 0x22 // F77 function name
17 #define N_FUN 0x24 // procedure name
18 #define N_STSYM 0x26 // data segment variable
19 #define N_LCSYM 0x28 // bss segment variable
20 #define N_MAIN 0x2a // main function name
21 #define N_PC 0x30 // global Pascal symbol
22 #define N_RSYM 0x40 // register variable
23 #define N_SLINE 0x44 // text segment line number
24 #define N_DSLINE 0x46 // data segment line number
25 #define N_BSLINE 0x48 // bss segment line number
26 #define N_SSYM 0x60 // structure/union element
27 #define N_SO 0x64 // main source file name
28 #define N_LSYM 0x80 // stack variable
29 #define N_BINCL 0x82 // include file beginning
30 #define N_SOL 0x84 // included source file name
31 #define N_PSYM 0xa0 // parameter variable
32 #define N_EINCL 0xa2 // include file end
33 #define N_ENTRY 0xa4 // alternate entry point
34 #define N_LBRAC 0xc0 // left bracket
35 #define N_EXCL 0xc2 // deleted include file
36 #define N_RBRAC 0xe0 // right bracket
37 #define N_BCOMM 0xe2 // begin common
38 #define N_ECOMM 0xe4 // end common
39 #define N_ECOML 0xe8 // end common (local name)
40 #define N_LENG 0xfe // length of preceding entry
42 // Entries in the STABS table are formatted as follows.
44 uint32_t n_strx
; // index into string table of name
45 uint8_t n_type
; // type of symbol
46 uint8_t n_other
; // misc info (usually empty)
47 uint16_t n_desc
; // description field
48 uintptr_t n_value
; // value of symbol
51 #endif /* !JOS_STAB_H */