mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:45:40 +00:00
[WINESYNC] dbghelp: Use local symtab and segment commands declarations.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 7b2e53f5b550e8a4d844c5e74941b02d1c770b0b by Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
parent
63f681c1e6
commit
92dc946e86
2 changed files with 46 additions and 6 deletions
|
@ -92,6 +92,46 @@ union wine_all_image_infos {
|
||||||
struct dyld_all_image_infos64 infos64;
|
struct dyld_all_image_infos64 infos64;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct macho_segment_command
|
||||||
|
{
|
||||||
|
UINT32 cmd; /* LC_SEGMENT_64 */
|
||||||
|
UINT32 cmdsize; /* includes sizeof section_64 structs */
|
||||||
|
char segname[16]; /* segment name */
|
||||||
|
UINT64 vmaddr; /* memory address of this segment */
|
||||||
|
UINT64 vmsize; /* memory size of this segment */
|
||||||
|
UINT64 fileoff; /* file offset of this segment */
|
||||||
|
UINT64 filesize; /* amount to map from the file */
|
||||||
|
UINT32 maxprot; /* maximum VM protection */
|
||||||
|
UINT32 initprot; /* initial VM protection */
|
||||||
|
UINT32 nsects; /* number of sections in segment */
|
||||||
|
UINT32 flags; /* flags */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct macho_segment_command32
|
||||||
|
{
|
||||||
|
UINT32 cmd; /* LC_SEGMENT */
|
||||||
|
UINT32 cmdsize; /* includes sizeof section structs */
|
||||||
|
char segname[16]; /* segment name */
|
||||||
|
UINT32 vmaddr; /* memory address of this segment */
|
||||||
|
UINT32 vmsize; /* memory size of this segment */
|
||||||
|
UINT32 fileoff; /* file offset of this segment */
|
||||||
|
UINT32 filesize; /* amount to map from the file */
|
||||||
|
UINT32 maxprot; /* maximum VM protection */
|
||||||
|
UINT32 initprot; /* initial VM protection */
|
||||||
|
UINT32 nsects; /* number of sections in segment */
|
||||||
|
UINT32 flags; /* flags */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct macho_symtab_command
|
||||||
|
{
|
||||||
|
UINT32 cmd; /* LC_SYMTAB */
|
||||||
|
UINT32 cmdsize; /* sizeof(struct symtab_command) */
|
||||||
|
UINT32 symoff; /* symbol table offset */
|
||||||
|
UINT32 nsyms; /* number of symbol table entries */
|
||||||
|
UINT32 stroff; /* string table offset */
|
||||||
|
UINT32 strsize; /* string table size in bytes */
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef WORDS_BIGENDIAN
|
#ifdef WORDS_BIGENDIAN
|
||||||
#define swap_ulong_be_to_host(n) (n)
|
#define swap_ulong_be_to_host(n) (n)
|
||||||
#else
|
#else
|
||||||
|
@ -535,13 +575,13 @@ static int macho_count_sections(struct image_file_map* ifm, const struct macho_l
|
||||||
|
|
||||||
if (ifm->addr_size == 32)
|
if (ifm->addr_size == 32)
|
||||||
{
|
{
|
||||||
const struct segment_command *sc = (const struct segment_command *)lc;
|
const struct macho_segment_command32 *sc = (const struct macho_segment_command32 *)lc;
|
||||||
memcpy(segname, sc->segname, sizeof(segname));
|
memcpy(segname, sc->segname, sizeof(segname));
|
||||||
nsects = sc->nsects;
|
nsects = sc->nsects;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const struct segment_command_64 *sc = (const struct segment_command_64 *)lc;
|
const struct macho_segment_command *sc = (const struct macho_segment_command *)lc;
|
||||||
memcpy(segname, sc->segname, sizeof(segname));
|
memcpy(segname, sc->segname, sizeof(segname));
|
||||||
nsects = sc->nsects;
|
nsects = sc->nsects;
|
||||||
}
|
}
|
||||||
|
@ -574,7 +614,7 @@ static int macho_load_section_info(struct image_file_map* ifm, const struct mach
|
||||||
|
|
||||||
if (ifm->addr_size == 32)
|
if (ifm->addr_size == 32)
|
||||||
{
|
{
|
||||||
const struct segment_command *sc = (const struct segment_command *)lc;
|
const struct macho_segment_command32 *sc = (const struct macho_segment_command32 *)lc;
|
||||||
vmaddr = sc->vmaddr;
|
vmaddr = sc->vmaddr;
|
||||||
vmsize = sc->vmsize;
|
vmsize = sc->vmsize;
|
||||||
memcpy(segname, sc->segname, sizeof(segname));
|
memcpy(segname, sc->segname, sizeof(segname));
|
||||||
|
@ -583,7 +623,7 @@ static int macho_load_section_info(struct image_file_map* ifm, const struct mach
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const struct segment_command_64 *sc = (const struct segment_command_64 *)lc;
|
const struct macho_segment_command *sc = (const struct macho_segment_command *)lc;
|
||||||
vmaddr = sc->vmaddr;
|
vmaddr = sc->vmaddr;
|
||||||
vmsize = sc->vmsize;
|
vmsize = sc->vmsize;
|
||||||
memcpy(segname, sc->segname, sizeof(segname));
|
memcpy(segname, sc->segname, sizeof(segname));
|
||||||
|
@ -943,7 +983,7 @@ static int macho_parse_symtab(struct image_file_map* ifm,
|
||||||
const struct macho_load_command* lc, void* user)
|
const struct macho_load_command* lc, void* user)
|
||||||
{
|
{
|
||||||
struct macho_file_map* fmap = &ifm->u.macho;
|
struct macho_file_map* fmap = &ifm->u.macho;
|
||||||
const struct symtab_command* sc = (const struct symtab_command*)lc;
|
const struct macho_symtab_command* sc = (const struct macho_symtab_command*)lc;
|
||||||
struct macho_debug_info* mdi = user;
|
struct macho_debug_info* mdi = user;
|
||||||
const char* stabstr;
|
const char* stabstr;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
|
@ -4,4 +4,4 @@ files:
|
||||||
include/dbghelp.h: sdk/include/psdk/dbghelp.h
|
include/dbghelp.h: sdk/include/psdk/dbghelp.h
|
||||||
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
|
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
|
||||||
tags:
|
tags:
|
||||||
wine: 8230889f1f2e545222f3a51ba9b47fa02196eb98
|
wine: 7b2e53f5b550e8a4d844c5e74941b02d1c770b0b
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue