#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "dbghelp_private.h"
#include "wine/debug.h"
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (dbghelp) |
|
int | source_rb_compare (const void *key, const struct wine_rb_entry *entry) |
|
static unsigned | source_find (const char *name) |
|
unsigned | source_new (struct module *module, const char *base, const char *name) |
|
const char * | source_get (const struct module *module, unsigned idx) |
|
BOOL WINAPI | SymEnumSourceFilesW (HANDLE hProcess, ULONG64 ModBase, PCWSTR Mask, PSYM_ENUMSOURCEFILES_CALLBACKW cbSrcFiles, PVOID UserContext) |
|
static BOOL CALLBACK | enum_source_files_W_to_A (PSOURCEFILEW source_file, PVOID context) |
|
BOOL WINAPI | SymEnumSourceFiles (HANDLE hProcess, ULONG64 ModBase, PCSTR Mask, PSYM_ENUMSOURCEFILES_CALLBACK cbSrcFiles, PVOID UserContext) |
|
BOOL WINAPI | SymEnumSourceLines (HANDLE hProcess, ULONG64 base, PCSTR obj, PCSTR file, DWORD line, DWORD flags, PSYM_ENUMLINES_CALLBACK EnumLinesCallback, PVOID UserContext) |
|
BOOL WINAPI | SymEnumSourceLinesW (HANDLE hProcess, ULONG64 base, PCWSTR obj, PCWSTR file, DWORD line, DWORD flags, PSYM_ENUMLINES_CALLBACKW EnumLinesCallback, PVOID UserContext) |
|
BOOL WINAPI | SymGetSourceFileToken (HANDLE hProcess, ULONG64 base, PCSTR src, PVOID *token, DWORD *size) |
|
BOOL WINAPI | SymGetSourceFileTokenW (HANDLE hProcess, ULONG64 base, PCWSTR src, PVOID *token, DWORD *size) |
|
◆ enum_source_files_W_to_A()
Definition at line 207 of file source.c.
208{
212
214 if (
len >
ctx->conversion_buffer_len)
215 {
218
220 {
223 }
224
225 ctx->conversion_buffer =
ptr;
226 ctx->conversion_buffer_len =
len;
227 }
228
230
233 return ctx->callbackA(&source_fileA,
ctx->caller_context);
234}
#define WideCharToMultiByte
Referenced by SymEnumSourceFiles().
◆ source_find()
Definition at line 52 of file source.c.
53{
55
59}
static struct module * rb_module
#define WINE_RB_ENTRY_VALUE(element, type, field)
static struct wine_rb_entry * wine_rb_get(const struct wine_rb_tree *tree, const void *key)
Referenced by source_new().
◆ source_get()
◆ source_new()
Definition at line 66 of file source.c.
67{
69 const char* full;
71
75 else
76 {
78
81 full = tmp;
83 if (tmp[bsz - 1] != '/') tmp[bsz++] = '/';
85 }
88 {
89 char* new;
92
94 {
96 {
99 }
100 else
101 {
106 }
107 if (!new) goto done;
109 }
115 {
118 }
119 }
120done:
123}
ACPI_SIZE strlen(const char *String)
void * pool_alloc(struct pool *a, size_t len) DECLSPEC_HIDDEN
#define HeapFree(x, y, z)
static unsigned source_find(const char *name)
#define memcpy(s1, s2, n)
static int wine_rb_put(struct wine_rb_tree *tree, const void *key, struct wine_rb_entry *entry)
struct wine_rb_tree sources_offsets_tree
struct wine_rb_entry entry
Referenced by codeview_snarf(), codeview_snarf_linetab(), codeview_snarf_linetab2(), coff_add_file(), dwarf2_parse_compilation_unit(), dwarf2_parse_line_numbers(), elf_hash_symtab(), pe_load_coff_symbol_table(), rsym_parse(), and stabs_parse().
◆ source_rb_compare()
Definition at line 40 of file source.c.
41{
43
45}
int strcmp(const char *String1, const char *String2)
Referenced by module_new().
◆ SymEnumSourceFiles()
Definition at line 240 of file source.c.
243{
249
251 {
253
255 if (!maskW)
256 {
259 }
260
262 }
263
264 if (cbSrcFiles)
265 {
268 }
269 else
270 {
273 }
274
276
278 {
281 }
282
285
287}
BOOL(CALLBACK * PSYM_ENUMSOURCEFILES_CALLBACKW)(PSOURCEFILEW, PVOID)
#define MultiByteToWideChar
BOOL WINAPI SymEnumSourceFilesW(HANDLE hProcess, ULONG64 ModBase, PCWSTR Mask, PSYM_ENUMSOURCEFILES_CALLBACKW cbSrcFiles, PVOID UserContext)
static BOOL CALLBACK enum_source_files_W_to_A(PSOURCEFILEW source_file, PVOID context)
_In_ BOOL _In_ HANDLE hProcess
static BOOL CALLBACK callbackW(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA data, LPVOID context)
◆ SymEnumSourceFilesW()
Definition at line 141 of file source.c.
144{
149 DWORD conversion_buffer_len = 0;
150
151 if (!cbSrcFiles)
return FALSE;
154
155 if (ModBase)
156 {
159 }
160 else
161 {
163 {
166 }
167 else
168 {
169 FIXME(
"Unsupported yet (should get info from current context)\n");
171 }
172 }
173 if (!
pair.effective->sources)
return FALSE;
175 {
177
178 if (
len > conversion_buffer_len)
179 {
182 if (!conversion_buffer)
return FALSE;
183 conversion_buffer_len =
len;
184 }
185
187
188
189 sf.ModBase = ModBase;
190 sf.FileName = conversion_buffer;
191 if (!cbSrcFiles(&sf, UserContext)) break;
192 }
193
196}
struct module * module_find_by_nameW(const struct process *pcs, const WCHAR *name) DECLSPEC_HIDDEN
struct module * module_find_by_addr(const struct process *pcs, DWORD64 addr, enum module_type type) DECLSPEC_HIDDEN
BOOL module_get_debug(struct module_pair *) DECLSPEC_HIDDEN
struct process * process_find_by_handle(HANDLE hProcess)
Referenced by SymEnumSourceFiles().
◆ SymEnumSourceLines()
Definition at line 293 of file source.c.
297{
298 FIXME(
"%p %s %s %s %u %u %p %p: stub!\n",
300 line,
flags, EnumLinesCallback, UserContext);
303}
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define ERROR_NOT_SUPPORTED
◆ SymEnumSourceLinesW()
Definition at line 309 of file source.c.
313{
314 FIXME(
"%p %s %s %s %u %u %p %p: stub!\n",
316 line,
flags, EnumLinesCallback, UserContext);
319}
◆ SymGetSourceFileToken()
Definition at line 325 of file source.c.
327{
328 FIXME(
"%p %s %s %p %p: stub!\n",
332}
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 token
◆ SymGetSourceFileTokenW()
Definition at line 338 of file source.c.
340{
341 FIXME(
"%p %s %s %p %p: stub!\n",
345}
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
dbghelp |
| ) |
|
◆ rb_module