149{
154 const char* coff_strtab;
158 int curr_file_idx = -1;
163 int linetab_indx;
164 const char* nampnt;
165 int naux;
168
169 TRACE(
"Processing COFF symbols...\n");
170
173
174 coff_files.files =
NULL;
175 coff_files.nfiles = coff_files.nfiles_alloc = 0;
176
178
182
183 linetab_indx = 0;
184
186 {
187 coff_sym = coff_symbols +
i;
189
191 {
193 (const char*)(coff_sym + 1));
194 TRACE(
"New file %s\n", (
const char*)(coff_sym + 1));
196 continue;
197 }
198
199 if (curr_file_idx < 0)
200 {
201 assert(coff_files.nfiles == 0 && coff_files.nfiles_alloc == 0);
203 TRACE(
"New file <none>\n");
204 }
205
206
207
208
209
210
211
214 {
216
217 if (coff_files.files[curr_file_idx].linetab_offset != -1)
218 {
219
220
221
223
225 coff_files.files[curr_file_idx].compiland->source);
226
227 TRACE(
"Duplicating sect from %s: %x %x %x %d %d\n",
228 fn,
aux->Section.Length,
229 aux->Section.NumberOfRelocations,
230 aux->Section.NumberOfLinenumbers,
231 aux->Section.Number,
aux->Section.Selection);
232 TRACE(
"More sect %d %s %08x %d %d %d\n",
237
238
239
240
241
243 }
244 else
245 {
246 TRACE(
"New text sect from %s: %x %x %x %d %d\n",
247 source_get(msc_dbg->
module, coff_files.files[curr_file_idx].compiland->source),
249 aux->Section.NumberOfRelocations,
250 aux->Section.NumberOfLinenumbers,
251 aux->Section.Number,
aux->Section.Selection);
252 }
253
254 if (coff_files.files[curr_file_idx].startaddr > coff_sym->
Value)
255 {
256 coff_files.files[curr_file_idx].startaddr = coff_sym->
Value;
257 }
258
259 if (coff_files.files[curr_file_idx].endaddr < coff_sym->
Value +
aux->Section.Length)
260 {
261 coff_files.files[curr_file_idx].endaddr = coff_sym->
Value +
aux->Section.Length;
262 }
263
264 coff_files.files[curr_file_idx].linetab_offset = linetab_indx;
265 coff_files.files[curr_file_idx].linecnt =
aux->Section.NumberOfLinenumbers;
266 linetab_indx +=
aux->Section.NumberOfLinenumbers;
268 continue;
269 }
270
273 {
275
276
277
278
279
281
282 TRACE(
"\tAdding static symbol %s\n", nampnt);
283
284
287 coff_files.files[curr_file_idx].compiland,
288 nampnt,
290 0 ,
292 continue;
293 }
294
297 {
301
304 nampnt);
305 TRACE(
"\tAdding global symbol %s (sect=%s)\n",
307
308
309
310
311 for (
j = 0;
j < coff_files.nfiles;
j++)
312 {
313 if (coff_files.files[
j].startaddr <=
base + coff_sym->
Value
314 && coff_files.files[
j].endaddr >
base + coff_sym->
Value)
315 {
316 compiland = coff_files.files[
j].compiland;
317 break;
318 }
319 }
320 if (
j < coff_files.nfiles)
321 {
326 }
327 else
328 {
332 }
334 continue;
335 }
336
339 {
342
343
344
345
346
348
351 nampnt);
352 TRACE(
"\tAdding global data symbol %s\n", nampnt);
353
354
355
356
358 loc.reg = 0;
359 loc.offset = msc_dbg->
module->module.BaseOfImage +
base + coff_sym->
Value;
363 continue;
364 }
365
367 {
368
369
370
371
372 continue;
373 }
374
375 TRACE(
"Skipping unknown entry '%s' %d %d %d\n",
378
379
380
381
383 }
384
385 if (coff_files.files !=
NULL)
386 {
387
388
389
390
391
392
393 for (
j = 0;
j < coff_files.nfiles;
j++)
394 {
395 if (coff_files.files[
j].entries !=
NULL)
396 {
397 qsort(coff_files.files[
j].entries, coff_files.files[
j].neps,
399 }
400 }
401
402
403
404
405
406 for (
j = 0;
j < coff_files.nfiles;
j++)
407 {
409 if (coff_files.files[
j].neps != 0)
410 {
411 for (
k = 0;
k < coff_files.files[
j].linecnt;
k++)
412 {
413 linepnt = coff_linetab + coff_files.files[
j].linetab_offset +
k;
414
415
416
417
418 for (;
l+1 < coff_files.files[
j].neps;
l++)
419 {
422 {
424 {
425
426
427
428
429
432 coff_files.files[
j].compiland->source,
435 }
436 break;
437 }
438 }
439 }
440 }
441 }
442
443 for (
j = 0;
j < coff_files.nfiles;
j++)
444 {
446 }
449
456 }
457
459}
static int coff_add_file(struct CoffFileSet *coff_files, struct module *module, const char *filename)
static void coff_add_symbol(struct CoffFile *coff_file, struct symt *sym)
static const char * coff_get_name(const IMAGE_SYMBOL *coff_sym, const char *coff_strtab)
struct symt_function * symt_new_function(struct module *module, struct symt_compiland *parent, const char *name, ULONG_PTR addr, ULONG_PTR size, struct symt *type) DECLSPEC_HIDDEN
int __cdecl symt_cmp_addr(const void *p1, const void *p2) DECLSPEC_HIDDEN
struct symt_data * symt_new_global_variable(struct module *module, struct symt_compiland *parent, const char *name, unsigned is_static, struct location loc, ULONG_PTR size, struct symt *type) DECLSPEC_HIDDEN
BOOL symt_get_address(const struct symt *type, ULONG64 *addr) DECLSPEC_HIDDEN
const char * source_get(const struct module *module, unsigned idx) DECLSPEC_HIDDEN
void symt_add_func_line(struct module *module, struct symt_function *func, unsigned source_idx, int line_num, ULONG_PTR offset) DECLSPEC_HIDDEN
#define IMAGE_SYM_CLASS_EXTERNAL
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define HeapFree(x, y, z)
#define IMAGE_SYM_CLASS_FILE
GLenum const GLvoid * addr
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
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 GLint GLint j
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
union _IMAGE_LINENUMBER::@4187 Type
const IMAGE_SECTION_HEADER * sectp
static GLenum _GLUfuncptr fn
#define IMAGE_SIZEOF_SYMBOL
#define IMAGE_SIZEOF_LINENUMBER
#define IMAGE_SYM_CLASS_STATIC