GEL  0.99
stabs.h File Reference
#include <stdint.h>
#include <gel/gel.h>
#include <gel/debug_line.h>

Go to the source code of this file.

Data Structures

struct  stab_t
 

Macros

#define STABS_SECT_STAB   ".stab"
 
#define STABS_SECT_STABSTR   ".stabstr"
 
#define N_UNDF   0x00 /** Start of object file */
 
#define N_GSYM   0x20 /** Global symbol */
 
#define N_FUN   0x24 /** Function or procedure */
 
#define N_OUTL   0x25 /** Outlined function */
 
#define N_STSYM   0x26 /** Initialized static symbol */
 
#define N_TSTSYM   0x27 /** Initialized TLS static variable */
 
#define N_LCSYM   0x28 /** Unitialized static symbol */
 
#define N_MAIN   0x2a /** Name of main routine */
 
#define N_ROSYM   0x2c /** Read-only static symbol */
 
#define N_FLSYM   0x2e /** Global symbol */
 
#define N_TFLSYM   0x2f /** Global symbol */
 
#define N_CMDLINE   0x34
 
#define N_OBJ   0x38 /** Object file or path name */
 
#define N_OPT   0x3c /** Compiler options */
 
#define N_RSYM   0x40 /** Register symbol */
 
#define N_SLINE   0x44 /** Source line */
 
#define N_XLINE   0x45 /** Source line */
 
#define N_BROWS   0x48 /** Path to associated .cb file */
 
#define N_ILDPAD   0x4c /** Pad string table */
 
#define N_ENDM   0x62 /** End module */
 
#define N_SO   0x64 /** Compilation source file or path name */
 
#define N_MOD   0x66 /** Fortran 95 module begin */
 
#define N_EMOD   0x68 /** Fortran 95 module end */
 
#define N_READ_MOD   0x6a /** Fortran 95 use statement */
 
#define N_ALIAS   0x6c
 
#define N_LSYM   0x80 /** Local symbol */
 
#define N_BINCL   0x82 /** Begin include file */
 
#define N_SOL   0x84 /** Included or referenced source file */
 
#define N_PSYM   0xa0 /** Formal parameter */
 
#define N_EINCL   0xa2 /** End of include file */
 
#define N_ENTRY   0xa4 /** Fortram alternate entry */
 
#define N_LBRAC   0xc0 /** Start of scope (left bracket) */
 
#define N_USING   0xc4 /** C++ USING statement */
 
#define N_ISYM   0xc6 /** Position independent type, internal */
 
#define N_ESYM   0xc8 /** Position independent type, external */
 
#define N_PATCH   0xd0
 
#define N_CONSTRUCT   0xd2 /** Constructor description */
 
#define N_DESTRUCT   0xd4 /** Destructor description */
 
#define N_CODETAG   0xd8 /** Code generation detail */
 
#define N_FUN_CHILD   0xd9 /** Created when a nesting relationship */
 
#define N_RBRAC   0xe0 /** End of scope (right bracket) */
 
#define N_BCOMM   0xe2 /** Begin common block */
 
#define N_TCOMM   0xe3 /** Begin task common block */
 
#define N_ECOMM   0xe4 /** End common block */
 
#define STABS_ERR_BASE   (-256)
 
#define STABS_ERR_NONE   (-256) /** No STABS section found */
 
#define STABS_ERR_NOSTR   (-258) /** No STABS string section */
 
#define STABS_ERR_NORES   (-260) /** No more ressource */
 
#define STABS_ERR_FMT   (-262) /** Format error */
 

Typedefs

typedef struct stab_t stab_t
 
typedef struct stabs_t stabs_t
 

Functions

stabs_tstabs_new (gel_file_t *file)
 
void stabs_delete (stabs_t *stabs)
 
const char * stabs_strerror (void)
 
int stabs_count (stabs_t *stabs)
 
stab_tstabs_item (stabs_t *stabs, int i)
 
gel_line_map_tstabs_new_line_map (gel_file_t *file)
 

Macro Definition Documentation

◆ N_ALIAS

#define N_ALIAS   0x6c

◆ N_BCOMM

#define N_BCOMM   0xe2 /** Begin common block */

◆ N_BINCL

#define N_BINCL   0x82 /** Begin include file */

◆ N_BROWS

#define N_BROWS   0x48 /** Path to associated .cb file */

◆ N_CMDLINE

#define N_CMDLINE   0x34

◆ N_CODETAG

#define N_CODETAG   0xd8 /** Code generation detail */

◆ N_CONSTRUCT

#define N_CONSTRUCT   0xd2 /** Constructor description */

◆ N_DESTRUCT

#define N_DESTRUCT   0xd4 /** Destructor description */

◆ N_ECOMM

#define N_ECOMM   0xe4 /** End common block */

◆ N_EINCL

#define N_EINCL   0xa2 /** End of include file */

◆ N_EMOD

#define N_EMOD   0x68 /** Fortran 95 module end */

◆ N_ENDM

#define N_ENDM   0x62 /** End module */

◆ N_ENTRY

#define N_ENTRY   0xa4 /** Fortram alternate entry */

◆ N_ESYM

#define N_ESYM   0xc8 /** Position independent type, external */

◆ N_FLSYM

#define N_FLSYM   0x2e /** Global symbol */

◆ N_FUN

#define N_FUN   0x24 /** Function or procedure */

◆ N_FUN_CHILD

#define N_FUN_CHILD   0xd9 /** Created when a nesting relationship */

◆ N_GSYM

#define N_GSYM   0x20 /** Global symbol */

◆ N_ILDPAD

#define N_ILDPAD   0x4c /** Pad string table */

◆ N_ISYM

#define N_ISYM   0xc6 /** Position independent type, internal */

◆ N_LBRAC

#define N_LBRAC   0xc0 /** Start of scope (left bracket) */

◆ N_LCSYM

#define N_LCSYM   0x28 /** Unitialized static symbol */

◆ N_LSYM

#define N_LSYM   0x80 /** Local symbol */

◆ N_MAIN

#define N_MAIN   0x2a /** Name of main routine */

◆ N_MOD

#define N_MOD   0x66 /** Fortran 95 module begin */

◆ N_OBJ

#define N_OBJ   0x38 /** Object file or path name */

◆ N_OPT

#define N_OPT   0x3c /** Compiler options */

◆ N_OUTL

#define N_OUTL   0x25 /** Outlined function */

◆ N_PATCH

#define N_PATCH   0xd0

◆ N_PSYM

#define N_PSYM   0xa0 /** Formal parameter */

◆ N_RBRAC

#define N_RBRAC   0xe0 /** End of scope (right bracket) */

◆ N_READ_MOD

#define N_READ_MOD   0x6a /** Fortran 95 use statement */

◆ N_ROSYM

#define N_ROSYM   0x2c /** Read-only static symbol */

◆ N_RSYM

#define N_RSYM   0x40 /** Register symbol */

◆ N_SLINE

#define N_SLINE   0x44 /** Source line */

◆ N_SO

#define N_SO   0x64 /** Compilation source file or path name */

◆ N_SOL

#define N_SOL   0x84 /** Included or referenced source file */

◆ N_STSYM

#define N_STSYM   0x26 /** Initialized static symbol */

◆ N_TCOMM

#define N_TCOMM   0xe3 /** Begin task common block */

◆ N_TFLSYM

#define N_TFLSYM   0x2f /** Global symbol */

◆ N_TSTSYM

#define N_TSTSYM   0x27 /** Initialized TLS static variable */

◆ N_UNDF

#define N_UNDF   0x00 /** Start of object file */

◆ N_USING

#define N_USING   0xc4 /** C++ USING statement */

◆ N_XLINE

#define N_XLINE   0x45 /** Source line */

◆ STABS_ERR_BASE

#define STABS_ERR_BASE   (-256)

◆ STABS_ERR_FMT

#define STABS_ERR_FMT   (-262) /** Format error */

◆ STABS_ERR_NONE

#define STABS_ERR_NONE   (-256) /** No STABS section found */

◆ STABS_ERR_NORES

#define STABS_ERR_NORES   (-260) /** No more ressource */

◆ STABS_ERR_NOSTR

#define STABS_ERR_NOSTR   (-258) /** No STABS string section */

◆ STABS_SECT_STAB

#define STABS_SECT_STAB   ".stab"

◆ STABS_SECT_STABSTR

#define STABS_SECT_STABSTR   ".stabstr"

Typedef Documentation

◆ stab_t

typedef struct stab_t stab_t

STAB item

◆ stabs_t

typedef struct stabs_t stabs_t

STABS module datastructure

Function Documentation

◆ stabs_count()

int stabs_count ( stabs_t stabs)

Get the count of items in STABS.

Parameters
stabsSTABS handle.
Returns
Count of items.

◆ stabs_delete()

void stabs_delete ( stabs_t stabs)

Delete a STABS handler.

Parameters
stabsSTABS handler to delete.

◆ stabs_item()

stab_t* stabs_item ( stabs_t stabs,
int  i 
)

Get the item at the given index.

Parameters
stabsSTABS handle.
iIndex of the item.
Returns
Item matching the index.

◆ stabs_new()

stabs_t* stabs_new ( gel_file_t file)

Open the STABS section of the given file.

Parameters
fileFile to look in.
Returns
STABS handler or null if there is an error.

◆ stabs_new_line_map()

gel_line_map_t* stabs_new_line_map ( gel_file_t file)

Build the line information.

Parameters
fileFile containing the section.
Returns
Read line map or null for an error. gel_errno errors include:

◆ stabs_strerror()

const char* stabs_strerror ( void  )