[WINESYNC] dbghelp: Use local macho load command declaration.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id c695e7e99e0a06b6039d46f98fea35c363aa6cbe by Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
winesync 2020-09-11 18:59:48 +02:00 committed by Jérôme Gardou
parent 00783527e0
commit 739259ac2f
3 changed files with 28 additions and 15 deletions

View File

@ -65,6 +65,19 @@ struct elf_section_header
UINT64 sh_entsize; /* Entry size if section holds table */
};
struct macho_load_command
{
UINT32 cmd; /* type of load command */
UINT32 cmdsize; /* total size of command in bytes */
};
struct macho_uuid_command
{
UINT32 cmd; /* LC_UUID */
UINT32 cmdsize;
UINT8 uuid[16];
};
/* structure holding information while handling an ELF image
* allows one by one section mapping for memory savings
*/
@ -100,14 +113,14 @@ struct image_file_map
size_t commands_size;
size_t commands_count;
#ifdef HAVE_MACH_O_LOADER_H
const struct load_command* load_commands;
const struct uuid_command* uuid;
const struct macho_load_command* load_commands;
const struct macho_uuid_command* uuid;
/* The offset in the file which is this architecture. mach_header was
* read from arch_offset. */
unsigned arch_offset;
#ifdef HAVE_MACH_O_LOADER_H
int num_sections;
struct
{

View File

@ -443,11 +443,11 @@ static const struct image_file_map_ops macho_file_map_ops =
*
* Maps the load commands from a Mach-O file into memory
*/
static const struct load_command* macho_map_load_commands(struct macho_file_map* fmap)
static const struct macho_load_command* macho_map_load_commands(struct macho_file_map* fmap)
{
if (fmap->load_commands == IMAGE_NO_MAP)
{
fmap->load_commands = (const struct load_command*) macho_map_range(
fmap->load_commands = (const struct macho_load_command*) macho_map_range(
fmap, fmap->header_size, fmap->commands_size, NULL);
TRACE("Mapped load commands: %p\n", fmap->load_commands);
}
@ -475,9 +475,9 @@ static void macho_unmap_load_commands(struct macho_file_map* fmap)
*
* Advance to the next load command
*/
static const struct load_command* macho_next_load_command(const struct load_command* lc)
static const struct macho_load_command* macho_next_load_command(const struct macho_load_command* lc)
{
return (const struct load_command*)((const char*)lc + lc->cmdsize);
return (const struct macho_load_command*)((const char*)lc + lc->cmdsize);
}
/******************************************************************
@ -492,11 +492,11 @@ static const struct load_command* macho_next_load_command(const struct load_comm
* processed.
*/
static int macho_enum_load_commands(struct image_file_map *ifm, unsigned cmd,
int (*cb)(struct image_file_map*, const struct load_command*, void*),
int (*cb)(struct image_file_map*, const struct macho_load_command*, void*),
void* user)
{
struct macho_file_map* fmap = &ifm->u.macho;
const struct load_command* lc;
const struct macho_load_command* lc;
int i;
int count = 0;
@ -528,7 +528,7 @@ static int macho_enum_load_commands(struct image_file_map *ifm, unsigned cmd,
* significant sections in a Mach-O file. All commands are
* expected to be of LC_SEGMENT[_64] type.
*/
static int macho_count_sections(struct image_file_map* ifm, const struct load_command* lc, void* user)
static int macho_count_sections(struct image_file_map* ifm, const struct macho_load_command* lc, void* user)
{
char segname[16];
uint32_t nsects;
@ -560,7 +560,7 @@ static int macho_count_sections(struct image_file_map* ifm, const struct load_co
* range covered by the segments of a Mach-O file and builds the
* section map. All commands are expected to be of LC_SEGMENT[_64] type.
*/
static int macho_load_section_info(struct image_file_map* ifm, const struct load_command* lc, void* user)
static int macho_load_section_info(struct image_file_map* ifm, const struct macho_load_command* lc, void* user)
{
struct macho_file_map* fmap = &ifm->u.macho;
struct section_info* info = user;
@ -652,9 +652,9 @@ static int macho_load_section_info(struct image_file_map* ifm, const struct load
* Callback for macho_enum_load_commands. Records the UUID load
* command of a Mach-O file.
*/
static int find_uuid(struct image_file_map* ifm, const struct load_command* lc, void* user)
static int find_uuid(struct image_file_map* ifm, const struct macho_load_command* lc, void* user)
{
ifm->u.macho.uuid = (const struct uuid_command*)lc;
ifm->u.macho.uuid = (const struct macho_uuid_command*)lc;
return 1;
}
@ -927,7 +927,7 @@ static void macho_stabs_def_cb(struct module* module, ULONG_PTR load_offset,
* load commands from the Mach-O file.
*/
static int macho_parse_symtab(struct image_file_map* ifm,
const struct load_command* lc, void* user)
const struct macho_load_command* lc, void* user)
{
struct macho_file_map* fmap = &ifm->u.macho;
const struct symtab_command* sc = (const struct symtab_command*)lc;

View File

@ -4,4 +4,4 @@ files:
include/dbghelp.h: sdk/include/psdk/dbghelp.h
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
tags:
wine: 7254579417f337063734933975b25d21da4d31f3
wine: c695e7e99e0a06b6039d46f98fea35c363aa6cbe