ReactOS  0.4.14-dev-384-g5b37caa
rsym.h File Reference
#include <typedefs.h>
#include <pecoff.h>
Include dependency graph for rsym.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  FILHDR
 
struct  SCNHDR
 
struct  _SYMBOLFILE_HEADER
 
struct  _STAB_ENTRY
 
struct  _COFF_SYMENT
 
struct  _ROSSYM_ENTRY
 

Macros

#define N_GYSM   0x20
 
#define N_FNAME   0x22
 
#define N_FUN   0x24
 
#define N_STSYM   0x26
 
#define N_LCSYM   0x28
 
#define N_MAIN   0x2A
 
#define N_PC   0x30
 
#define N_NSYMS   0x32
 
#define N_NOMAP   0x34
 
#define N_RSYM   0x40
 
#define N_M2C   0x42
 
#define N_SLINE   0x44
 
#define N_DSLINE   0x46
 
#define N_BSLINE   0x48
 
#define N_BROWS   0x48
 
#define N_DEFD   0x4A
 
#define N_EHDECL   0x50
 
#define N_MOD2   0x50
 
#define N_CATCH   0x54
 
#define N_SSYM   0x60
 
#define N_SO   0x64
 
#define N_LSYM   0x80
 
#define N_BINCL   0x82
 
#define N_SOL   0x84
 
#define N_PSYM   0xA0
 
#define N_EINCL   0xA2
 
#define N_ENTRY   0xA4
 
#define N_LBRAC   0xC0
 
#define N_EXCL   0xC2
 
#define N_SCOPE   0xC4
 
#define N_RBRAC   0xE0
 
#define N_BCOMM   0xE2
 
#define N_ECOMM   0xE4
 
#define N_ECOML   0xE8
 
#define N_LENG   0xFE
 
#define E_SYMNMLEN   8 /* # characters in a symbol name */
 
#define E_FILNMLEN   14 /* # characters in a file name */
 
#define E_DIMNUM   4 /* # array dimensions in auxiliary entry */
 
#define N_BTMASK   (0xf)
 
#define N_TMASK   (0x30)
 
#define N_BTSHFT   (4)
 
#define N_TSHIFT   (2)
 
#define DT_NON   (0) /* no derived type */
 
#define DT_PTR   (1) /* pointer */
 
#define DT_FCN   (2) /* function */
 
#define DT_ARY   (3) /* array */
 
#define BTYPE(x)   ((x) & N_BTMASK)
 
#define ISPTR(x)   (((x) & N_TMASK) == (DT_PTR << N_BTSHFT))
 
#define ISFCN(x)   (((x) & N_TMASK) == (DT_FCN << N_BTSHFT))
 
#define ISARY(x)   (((x) & N_TMASK) == (DT_ARY << N_BTSHFT))
 
#define ISTAG(x)   ((x)==C_STRTAG||(x)==C_UNTAG||(x)==C_ENTAG)
 
#define DECREF(x)   ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))
 
#define C_EFCN   0xff /* physical end of function */
 
#define C_NULL   0
 
#define C_AUTO   1 /* automatic variable */
 
#define C_EXT   2 /* external symbol */
 
#define C_STAT   3 /* static */
 
#define C_REG   4 /* register variable */
 
#define C_EXTDEF   5 /* external definition */
 
#define C_LABEL   6 /* label */
 
#define C_ULABEL   7 /* undefined label */
 
#define C_MOS   8 /* member of structure */
 
#define C_ARG   9 /* function argument */
 
#define C_STRTAG   10 /* structure tag */
 
#define C_MOU   11 /* member of union */
 
#define C_UNTAG   12 /* union tag */
 
#define C_TPDEF   13 /* type definition */
 
#define C_USTATIC   14 /* undefined static */
 
#define C_ENTAG   15 /* enumeration tag */
 
#define C_MOE   16 /* member of enumeration */
 
#define C_REGPARM   17 /* register parameter */
 
#define C_FIELD   18 /* bit field */
 
#define C_AUTOARG   19 /* auto argument */
 
#define C_LASTENT   20 /* dummy entry (end of block) */
 
#define C_BLOCK   100 /* ".bb" or ".eb" */
 
#define C_FCN   101 /* ".bf" or ".ef" */
 
#define C_EOS   102 /* end of structure */
 
#define C_FILE   103 /* file name */
 
#define C_LINE   104 /* line # reformatted as symbol table entry */
 
#define C_ALIAS   105 /* duplicate tag */
 
#define C_HIDDEN   106 /* ext symbol in dmert public lib */
 
#define ROUND_UP(N, S)   (((N) + (S) - 1) & ~((S) - 1))
 

Typedefs

typedef struct _SYMBOLFILE_HEADER SYMBOLFILE_HEADER
 
typedef struct _SYMBOLFILE_HEADERPSYMBOLFILE_HEADER
 
typedef struct _STAB_ENTRY STAB_ENTRY
 
typedef struct _STAB_ENTRYPSTAB_ENTRY
 
typedef struct _COFF_SYMENT COFF_SYMENT
 
typedef struct _COFF_SYMENTPCOFF_SYMENT
 
typedef ULONGLONG TARGET_ULONG_PTR
 
typedef struct _ROSSYM_ENTRY ROSSYM_ENTRY
 
typedef struct _ROSSYM_ENTRYPROSSYM_ENTRY
 

Functions

charconvert_path (const char *origpath)
 
voidload_file (const char *file_name, size_t *file_size)
 

Macro Definition Documentation

◆ BTYPE

#define BTYPE (   x)    ((x) & N_BTMASK)

Definition at line 100 of file rsym.h.

◆ C_ALIAS

#define C_ALIAS   105 /* duplicate tag */

Definition at line 135 of file rsym.h.

◆ C_ARG

#define C_ARG   9 /* function argument */

Definition at line 118 of file rsym.h.

◆ C_AUTO

#define C_AUTO   1 /* automatic variable */

Definition at line 110 of file rsym.h.

◆ C_AUTOARG

#define C_AUTOARG   19 /* auto argument */

Definition at line 128 of file rsym.h.

◆ C_BLOCK

#define C_BLOCK   100 /* ".bb" or ".eb" */

Definition at line 130 of file rsym.h.

◆ C_EFCN

#define C_EFCN   0xff /* physical end of function */

Definition at line 108 of file rsym.h.

◆ C_ENTAG

#define C_ENTAG   15 /* enumeration tag */

Definition at line 124 of file rsym.h.

◆ C_EOS

#define C_EOS   102 /* end of structure */

Definition at line 132 of file rsym.h.

◆ C_EXT

#define C_EXT   2 /* external symbol */

Definition at line 111 of file rsym.h.

◆ C_EXTDEF

#define C_EXTDEF   5 /* external definition */

Definition at line 114 of file rsym.h.

◆ C_FCN

#define C_FCN   101 /* ".bf" or ".ef" */

Definition at line 131 of file rsym.h.

◆ C_FIELD

#define C_FIELD   18 /* bit field */

Definition at line 127 of file rsym.h.

◆ C_FILE

#define C_FILE   103 /* file name */

Definition at line 133 of file rsym.h.

◆ C_HIDDEN

#define C_HIDDEN   106 /* ext symbol in dmert public lib */

Definition at line 136 of file rsym.h.

◆ C_LABEL

#define C_LABEL   6 /* label */

Definition at line 115 of file rsym.h.

◆ C_LASTENT

#define C_LASTENT   20 /* dummy entry (end of block) */

Definition at line 129 of file rsym.h.

◆ C_LINE

#define C_LINE   104 /* line # reformatted as symbol table entry */

Definition at line 134 of file rsym.h.

◆ C_MOE

#define C_MOE   16 /* member of enumeration */

Definition at line 125 of file rsym.h.

◆ C_MOS

#define C_MOS   8 /* member of structure */

Definition at line 117 of file rsym.h.

◆ C_MOU

#define C_MOU   11 /* member of union */

Definition at line 120 of file rsym.h.

◆ C_NULL

#define C_NULL   0

Definition at line 109 of file rsym.h.

◆ C_REG

#define C_REG   4 /* register variable */

Definition at line 113 of file rsym.h.

◆ C_REGPARM

#define C_REGPARM   17 /* register parameter */

Definition at line 126 of file rsym.h.

◆ C_STAT

#define C_STAT   3 /* static */

Definition at line 112 of file rsym.h.

◆ C_STRTAG

#define C_STRTAG   10 /* structure tag */

Definition at line 119 of file rsym.h.

◆ C_TPDEF

#define C_TPDEF   13 /* type definition */

Definition at line 122 of file rsym.h.

◆ C_ULABEL

#define C_ULABEL   7 /* undefined label */

Definition at line 116 of file rsym.h.

◆ C_UNTAG

#define C_UNTAG   12 /* union tag */

Definition at line 121 of file rsym.h.

◆ C_USTATIC

#define C_USTATIC   14 /* undefined static */

Definition at line 123 of file rsym.h.

◆ DECREF

#define DECREF (   x)    ((((x)>>N_TSHIFT)&~N_BTMASK)|((x)&N_BTMASK))

Definition at line 106 of file rsym.h.

◆ DT_ARY

#define DT_ARY   (3) /* array */

Definition at line 98 of file rsym.h.

◆ DT_FCN

#define DT_FCN   (2) /* function */

Definition at line 97 of file rsym.h.

◆ DT_NON

#define DT_NON   (0) /* no derived type */

Definition at line 95 of file rsym.h.

◆ DT_PTR

#define DT_PTR   (1) /* pointer */

Definition at line 96 of file rsym.h.

◆ E_DIMNUM

#define E_DIMNUM   4 /* # array dimensions in auxiliary entry */

Definition at line 87 of file rsym.h.

◆ E_FILNMLEN

#define E_FILNMLEN   14 /* # characters in a file name */

Definition at line 86 of file rsym.h.

◆ E_SYMNMLEN

#define E_SYMNMLEN   8 /* # characters in a symbol name */

Definition at line 85 of file rsym.h.

◆ ISARY

#define ISARY (   x)    (((x) & N_TMASK) == (DT_ARY << N_BTSHFT))

Definition at line 104 of file rsym.h.

◆ ISFCN

#define ISFCN (   x)    (((x) & N_TMASK) == (DT_FCN << N_BTSHFT))

Definition at line 103 of file rsym.h.

◆ ISPTR

#define ISPTR (   x)    (((x) & N_TMASK) == (DT_PTR << N_BTSHFT))

Definition at line 102 of file rsym.h.

◆ ISTAG

#define ISTAG (   x)    ((x)==C_STRTAG||(x)==C_UNTAG||(x)==C_ENTAG)

Definition at line 105 of file rsym.h.

◆ N_BCOMM

#define N_BCOMM   0xE2

Definition at line 78 of file rsym.h.

◆ N_BINCL

#define N_BINCL   0x82

Definition at line 69 of file rsym.h.

◆ N_BROWS

#define N_BROWS   0x48

Definition at line 61 of file rsym.h.

◆ N_BSLINE

#define N_BSLINE   0x48

Definition at line 60 of file rsym.h.

◆ N_BTMASK

#define N_BTMASK   (0xf)

Definition at line 89 of file rsym.h.

◆ N_BTSHFT

#define N_BTSHFT   (4)

Definition at line 91 of file rsym.h.

◆ N_CATCH

#define N_CATCH   0x54

Definition at line 65 of file rsym.h.

◆ N_DEFD

#define N_DEFD   0x4A

Definition at line 62 of file rsym.h.

◆ N_DSLINE

#define N_DSLINE   0x46

Definition at line 59 of file rsym.h.

◆ N_ECOML

#define N_ECOML   0xE8

Definition at line 80 of file rsym.h.

◆ N_ECOMM

#define N_ECOMM   0xE4

Definition at line 79 of file rsym.h.

◆ N_EHDECL

#define N_EHDECL   0x50

Definition at line 63 of file rsym.h.

◆ N_EINCL

#define N_EINCL   0xA2

Definition at line 72 of file rsym.h.

◆ N_ENTRY

#define N_ENTRY   0xA4

Definition at line 73 of file rsym.h.

◆ N_EXCL

#define N_EXCL   0xC2

Definition at line 75 of file rsym.h.

◆ N_FNAME

#define N_FNAME   0x22

Definition at line 48 of file rsym.h.

◆ N_FUN

#define N_FUN   0x24

Definition at line 49 of file rsym.h.

◆ N_GYSM

#define N_GYSM   0x20

Definition at line 47 of file rsym.h.

◆ N_LBRAC

#define N_LBRAC   0xC0

Definition at line 74 of file rsym.h.

◆ N_LCSYM

#define N_LCSYM   0x28

Definition at line 51 of file rsym.h.

◆ N_LENG

#define N_LENG   0xFE

Definition at line 81 of file rsym.h.

◆ N_LSYM

#define N_LSYM   0x80

Definition at line 68 of file rsym.h.

◆ N_M2C

#define N_M2C   0x42

Definition at line 57 of file rsym.h.

◆ N_MAIN

#define N_MAIN   0x2A

Definition at line 52 of file rsym.h.

◆ N_MOD2

#define N_MOD2   0x50

Definition at line 64 of file rsym.h.

◆ N_NOMAP

#define N_NOMAP   0x34

Definition at line 55 of file rsym.h.

◆ N_NSYMS

#define N_NSYMS   0x32

Definition at line 54 of file rsym.h.

◆ N_PC

#define N_PC   0x30

Definition at line 53 of file rsym.h.

◆ N_PSYM

#define N_PSYM   0xA0

Definition at line 71 of file rsym.h.

◆ N_RBRAC

#define N_RBRAC   0xE0

Definition at line 77 of file rsym.h.

◆ N_RSYM

#define N_RSYM   0x40

Definition at line 56 of file rsym.h.

◆ N_SCOPE

#define N_SCOPE   0xC4

Definition at line 76 of file rsym.h.

◆ N_SLINE

#define N_SLINE   0x44

Definition at line 58 of file rsym.h.

◆ N_SO

#define N_SO   0x64

Definition at line 67 of file rsym.h.

◆ N_SOL

#define N_SOL   0x84

Definition at line 70 of file rsym.h.

◆ N_SSYM

#define N_SSYM   0x60

Definition at line 66 of file rsym.h.

◆ N_STSYM

#define N_STSYM   0x26

Definition at line 50 of file rsym.h.

◆ N_TMASK

#define N_TMASK   (0x30)

Definition at line 90 of file rsym.h.

◆ N_TSHIFT

#define N_TSHIFT   (2)

Definition at line 92 of file rsym.h.

◆ ROUND_UP

#define ROUND_UP (   N,
  S 
)    (((N) + (S) - 1) & ~((S) - 1))

Definition at line 173 of file rsym.h.

Typedef Documentation

◆ COFF_SYMENT

◆ PCOFF_SYMENT

◆ PROSSYM_ENTRY

◆ PSTAB_ENTRY

◆ PSYMBOLFILE_HEADER

◆ ROSSYM_ENTRY

◆ STAB_ENTRY

◆ SYMBOLFILE_HEADER

◆ TARGET_ULONG_PTR

Definition at line 163 of file rsym.h.

Function Documentation

◆ convert_path()

char* convert_path ( const char origpath)

Definition at line 39 of file hpp.c.

40 {
41  char* newpath;
42  int i;
43 
44  newpath = strdup(origpath);
45 
46  i = 0;
47  while (newpath[i] != 0)
48  {
49 #ifdef UNIX_PATHS
50  if (newpath[i] == '\\')
51  {
52  newpath[i] = '/';
53  }
54 #else
55 #ifdef DOS_PATHS
56  if (newpath[i] == '/')
57  {
58  newpath[i] = '\\';
59  }
60 #endif
61 #endif
62  i++;
63  }
64  return newpath;
65 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_Check_return_ _CRTIMP char *__cdecl strdup(_In_opt_z_ const char *_Src)

Referenced by main().

◆ load_file()

void* load_file ( const char file_name,
size_t file_size 
)

Definition at line 39 of file rsym_common.c.

40 {
41  FILE* f;
42  void* FileData = NULL;
43 
44  f = fopen ( file_name, "rb" );
45  if (f != NULL)
46  {
47  fseek(f, 0L, SEEK_END);
48  *file_size = ftell(f);
49  fseek(f, 0L, SEEK_SET);
51  if (FileData != NULL)
52  {
53  if ( *file_size != fread(FileData, 1, *file_size, f) )
54  {
55  free(FileData);
56  FileData = NULL;
57  }
58  }
59  fclose(f);
60  }
61  return FileData;
62 }
static FILEDATA FileData[MAX_FDS]
Definition: fs.c:51
#define free
Definition: debug_ros.c:5
_Check_return_opt_ _CRTIMP size_t __cdecl fread(_Out_writes_bytes_(_ElementSize *_Count) void *_DstBuf, _In_ size_t _ElementSize, _In_ size_t _Count, _Inout_ FILE *_File)
smooth NULL
Definition: ftsmooth.c:416
_Check_return_opt_ _CRTIMP int __cdecl fseek(_Inout_ FILE *_File, _In_ long _Offset, _In_ int _Origin)
#define SEEK_SET
Definition: jmemansi.c:26
GLfloat f
Definition: glext.h:7540
static const WCHAR L[]
Definition: oid.c:1250
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
#define f
Definition: ke_i.h:83
static LPCWSTR file_name
Definition: protocol.c:146
_Check_return_ _CRTIMP long __cdecl ftell(_Inout_ FILE *_File)
#define SEEK_END
Definition: cabinet.c:27
#define malloc
Definition: debug_ros.c:4
#define file_size(inode)
Definition: reiserfs_fs.h:1869