#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "rsym.h"
Go to the source code of this file.
◆ ABS_TRESHOLD
#define ABS_TRESHOLD 0x00400000L |
◆ find_and_print_offset()
Definition at line 71 of file raddr2line.c.
74{
80
81
82
83 for (
i = 0;
i < symbols;
i++ )
84 {
86 {
88 return 1;
89 else
90 {
94 (
unsigned int)
e->SourceLine,
96 return 0;
97 }
98 }
99 }
100 return 1;
101}
static const ENTRY Entries[]
static const WCHAR Strings[]
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
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
struct _ROSSYM_ENTRY * PROSSYM_ENTRY
struct _SYMBOLFILE_HEADER * PSYMBOLFILE_HEADER
Referenced by process_data().
◆ find_rossym_section()
Definition at line 58 of file raddr2line.c.
60{
63 {
64 if ( 0 ==
strcmp ( (
char*)PESectionHeaders[
i].
Name,
".rossym" ) )
65 return &PESectionHeaders[
i];
66 }
68}
int strcmp(const char *String1, const char *String2)
Referenced by process_data().
◆ fixup_offset()
◆ main()
Definition at line 172 of file raddr2line.c.
173{
177
179 {
182 }
183
186
188
190
192}
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
long my_atoi(const char *a)
int process_file(const char *file_name, size_t offset)
char * convert_path(char *origpath)
◆ my_atoi()
Definition at line 31 of file raddr2line.c.
32{
34 const char*
fmt =
"%x";
35
37 {
39 {
40 case 'x':
43 break;
44 case 'd':
47 break;
48 default:
50 break;
51 }
52 }
55}
GLboolean GLboolean GLboolean GLboolean a
_Check_return_ _CRTIMP int __cdecl sscanf(_In_z_ const char *_Src, _In_z_ _Scanf_format_string_ const char *_Format,...)
Referenced by main().
◆ process_data()
Definition at line 104 of file raddr2line.c.
105{
111 size_t ImageBase;
113
114
117 {
118 perror(
"Input file is not a PE image.\n");
119 return 1;
120 }
121
122
123
125
126
129
130
132
133
135
136
138 PEFileHeader, PESectionHeaders );
139 if ( !PERosSymSectionHeader )
140 {
141 fprintf (
stderr,
"Couldn't find rossym section in executable\n" );
142 return 1;
143 }
149}
static FILEDATA FileData[MAX_FDS]
struct _IMAGE_DOS_HEADER * PIMAGE_DOS_HEADER
struct _IMAGE_FILE_HEADER * PIMAGE_FILE_HEADER
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
struct _IMAGE_SECTION_HEADER * PIMAGE_SECTION_HEADER
struct _IMAGE_OPTIONAL_HEADER * PIMAGE_OPTIONAL_HEADER
int find_and_print_offset(void *data, size_t offset)
PIMAGE_SECTION_HEADER find_rossym_section(PIMAGE_FILE_HEADER PEFileHeader, PIMAGE_SECTION_HEADER PESectionHeaders)
size_t fixup_offset(size_t ImageBase, size_t offset)
Referenced by process_file().
◆ process_file()
Definition at line 152 of file raddr2line.c.
153{
157
160 {
162 }
163 else
164 {
167 }
168
170}
static UINT load_file(MSIRECORD *row, LPVOID param)
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
int process_data(const void *FileData, size_t offset)
Referenced by main().