* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#ifndef _DBGHELP_PRIVATE_H_
-#define _DBGHELP_PRIVATE_H_
+#pragma once
-#include <config.h>
-
-#include <assert.h>
-#include <stdio.h>
-
-#ifdef HAVE_SYS_MMAN_H
-# include <sys/mman.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
+#include <stdarg.h>
#ifndef DBGHELP_STATIC_LIB
-#include <wine/port.h>
-
-#include <ntstatus.h>
-#define WIN32_NO_STATUS
-#include <windef.h>
-#include <winbase.h>
-#include <winver.h>
-#include <winternl.h>
-#include <dbghelp.h>
-#include <objbase.h>
-#include <cvconst.h>
-#include <psapi.h>
+#include "windef.h"
+#include "winbase.h"
+#include "winver.h"
+#include "dbghelp.h"
+#include "objbase.h"
+#include "oaidl.h"
+#include "winnls.h"
+#include "wine/list.h"
+#include "wine/unicode.h"
+#include "wine/rbtree.h"
-#include <wine/debug.h>
-#include <wine/mscvpdb.h>
-#include <wine/unicode.h>
+#include "cvconst.h"
#else /* DBGHELP_STATIC_LIB */
#include <string.h>
#include "compat.h"
-
-#endif /* DBGHELP_STATIC_LIB */
-
#include <wine/list.h>
#include <wine/rbtree.h>
+#endif /* DBGHELP_STATIC_LIB */
/* #define USE_STATS */
struct hash_table_iter* hti, const char* name) DECLSPEC_HIDDEN;
void* hash_table_iter_up(struct hash_table_iter* hti) DECLSPEC_HIDDEN;
-#define GET_ENTRY(__i, __t, __f) \
- ((__t*)((char*)(__i) - FIELD_OFFSET(__t,__f)))
-
extern unsigned dbghelp_options DECLSPEC_HIDDEN;
/* some more Wine extensions */
{
unsigned kind : 8,
reg;
+#ifndef __REACTOS__
unsigned long offset;
+#else
+ uintptr_t offset;
+#endif
};
struct symt
struct symt symt;
struct hash_table_elt hash_elt;
struct symt* container; /* compiland */
+ BOOL is_function;
unsigned long address;
unsigned long size;
};
} u;
};
+#ifdef __REACTOS__
struct symt_idx_to_ptr
{
struct hash_table_elt hash_elt;
DWORD idx;
const struct symt *sym;
};
+#endif
-extern const struct wine_rb_functions source_rb_functions DECLSPEC_HIDDEN;
struct module
{
struct process* process;
IMAGEHLP_MODULEW64 module;
+ WCHAR modulename[64]; /* used for enumeration */
struct module* next;
enum module_type type : 16;
unsigned short is_virtual : 1;
DWORD frame_regno;
/* address manipulation */
- unsigned (*get_addr)(HANDLE hThread, const CONTEXT* ctx,
+ BOOL (*get_addr)(HANDLE hThread, const CONTEXT* ctx,
enum cpu_addr, ADDRESS64* addr);
/* stack manipulation */
void* (*find_runtime_function)(struct module*, DWORD64 addr);
/* dwarf dedicated information */
- unsigned (*map_dwarf_register)(unsigned regno);
+ unsigned (*map_dwarf_register)(unsigned regno, BOOL eh_frame);
/* context related manipulation */
void* (*fetch_context_reg)(CONTEXT* context, unsigned regno, unsigned* size);
/* dbghelp.c */
extern struct process* process_find_by_handle(HANDLE hProcess) DECLSPEC_HIDDEN;
-extern HANDLE hMsvcrt DECLSPEC_HIDDEN;
extern BOOL validate_addr64(DWORD64 addr) DECLSPEC_HIDDEN;
extern BOOL pcs_callback(const struct process* pcs, ULONG action, void* data) DECLSPEC_HIDDEN;
extern void* fetch_buffer(struct process* pcs, unsigned size) DECLSPEC_HIDDEN;
extern int elf_is_in_thunk_area(unsigned long addr, const struct elf_thunk_area* thunks) DECLSPEC_HIDDEN;
/* macho_module.c */
-#define MACHO_NO_MAP ((const void*)-1)
extern BOOL macho_enum_modules(HANDLE hProc, enum_modules_cb, void*) DECLSPEC_HIDDEN;
-extern BOOL macho_fetch_file_info(const WCHAR* name, DWORD_PTR* base, DWORD* size, DWORD* checksum) DECLSPEC_HIDDEN;
-struct macho_file_map;
-extern BOOL macho_load_debug_info(struct module* module, struct macho_file_map* fmap) DECLSPEC_HIDDEN;
+extern BOOL macho_fetch_file_info(HANDLE process, const WCHAR* name, unsigned long load_addr, DWORD_PTR* base, DWORD* size, DWORD* checksum) DECLSPEC_HIDDEN;
+extern BOOL macho_load_debug_info(struct module* module) DECLSPEC_HIDDEN;
extern struct module*
macho_load_module(struct process* pcs, const WCHAR* name, unsigned long) DECLSPEC_HIDDEN;
extern BOOL macho_read_wine_loader_dbg_info(struct process* pcs) DECLSPEC_HIDDEN;
extern BOOL macho_synchronize_module_list(struct process* pcs) DECLSPEC_HIDDEN;
/* minidump.c */
-void minidump_add_memory_block(struct dump_context* dc, ULONG64 base, ULONG size, ULONG rva);
+void minidump_add_memory_block(struct dump_context* dc, ULONG64 base, ULONG size, ULONG rva) DECLSPEC_HIDDEN;
/* module.c */
extern const WCHAR S_ElfW[] DECLSPEC_HIDDEN;
CONTEXT* context, struct pdb_cmd_pair* cpair) DECLSPEC_HIDDEN;
/* path.c */
-extern BOOL path_find_symbol_file(const struct process* pcs, PCSTR full_path,
- const GUID* guid, DWORD dw1, DWORD dw2, PSTR buffer,
- BOOL* is_unmatched) DECLSPEC_HIDDEN;
+extern BOOL path_find_symbol_file(const struct process* pcs, const struct module* module,
+ PCSTR full_path, const GUID* guid, DWORD dw1, DWORD dw2,
+ PSTR buffer, BOOL* is_unmatched) DECLSPEC_HIDDEN;
/* pe_module.c */
extern BOOL pe_load_nt_header(HANDLE hProc, DWORD64 base, IMAGE_NT_HEADERS* nth) DECLSPEC_HIDDEN;
extern BOOL pe_load_debug_info(const struct process* pcs,
struct module* module) DECLSPEC_HIDDEN;
extern const char* pe_map_directory(struct module* module, int dirno, DWORD* size) DECLSPEC_HIDDEN;
-extern void pe_unmap_directoy(struct module* module, int dirno) DECLSPEC_HIDDEN;
/* source.c */
extern unsigned source_new(struct module* module, const char* basedir, const char* source) DECLSPEC_HIDDEN;
extern const char* source_get(const struct module* module, unsigned idx) DECLSPEC_HIDDEN;
+extern int source_rb_compare(const void *key, const struct wine_rb_entry *entry) DECLSPEC_HIDDEN;
/* stabs.c */
typedef void (*stabs_def_cb)(struct module* module, unsigned long load_offset,
extern BOOL dwarf2_virtual_unwind(struct cpu_stack_walk* csw, DWORD_PTR ip,
CONTEXT* context, ULONG_PTR* cfa) DECLSPEC_HIDDEN;
+/* rsym.c */
+extern BOOL rsym_parse(struct module* module, unsigned long load_offset,
+ const void* rsym, int rsymlen) DECLSPEC_HIDDEN;
+
+
+
/* stack.c */
#ifndef DBGHELP_STATIC_LIB
extern BOOL sw_read_mem(struct cpu_stack_walk* csw, DWORD64 addr, void* ptr, DWORD sz) DECLSPEC_HIDDEN;
symt_new_public(struct module* module,
struct symt_compiland* parent,
const char* typename,
- unsigned long address, unsigned size) DECLSPEC_HIDDEN;
+ BOOL is_function,
+ unsigned long address,
+ unsigned size) DECLSPEC_HIDDEN;
extern struct symt_data*
symt_new_global_variable(struct module* module,
struct symt_compiland* parent,
extern struct symt_typedef*
symt_new_typedef(struct module* module, struct symt* ref,
const char* name) DECLSPEC_HIDDEN;
-
-#include "image_private.h"
-
-#endif /* _DBGHELP_PRIVATE_H_ */