Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0957cd03
Commit
0957cd03
authored
May 01, 2011
by
Eric Pouech
Committed by
Alexandre Julliard
May 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Simplify code a bit by using IMAGE_FIRST_SECTION() macro.
parent
b722e772
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
10 deletions
+7
-10
debug.c
tools/winedump/debug.c
+1
-2
pe.c
tools/winedump/pe.c
+4
-7
winedump.h
tools/winedump/winedump.h
+2
-1
No files found.
tools/winedump/debug.c
View file @
0957cd03
...
...
@@ -570,12 +570,11 @@ void dump_coff_symbol_table(const IMAGE_SYMBOL *coff_symbols, unsigned num_sy
}
}
void
dump_coff
(
unsigned
long
coffbase
,
unsigned
long
len
,
const
void
*
pmt
)
void
dump_coff
(
unsigned
long
coffbase
,
unsigned
long
len
,
const
IMAGE_SECTION_HEADER
*
sectHead
)
{
const
IMAGE_COFF_SYMBOLS_HEADER
*
coff
=
PRD
(
coffbase
,
len
);
const
IMAGE_SYMBOL
*
coff_symbols
=
(
const
IMAGE_SYMBOL
*
)
((
const
char
*
)
coff
+
coff
->
LvaToFirstSymbol
);
const
IMAGE_SECTION_HEADER
*
sectHead
=
pmt
;
dump_coff_symbol_table
(
coff_symbols
,
coff
->
NumberOfSymbols
,
sectHead
);
}
...
...
tools/winedump/pe.c
View file @
0957cd03
...
...
@@ -882,8 +882,8 @@ static void dump_dir_debug_dir(const IMAGE_DEBUG_DIRECTORY* idd, int idx)
case
IMAGE_DEBUG_TYPE_UNKNOWN
:
break
;
case
IMAGE_DEBUG_TYPE_COFF
:
dump_coff
(
idd
->
PointerToRawData
,
idd
->
SizeOfData
,
(
const
char
*
)
PE_nt_headers
+
sizeof
(
DWORD
)
+
sizeof
(
IMAGE_FILE_HEADER
)
+
PE_nt_headers
->
FileHeader
.
SizeOfOptionalHeader
);
dump_coff
(
idd
->
PointerToRawData
,
idd
->
SizeOfData
,
IMAGE_FIRST_SECTION
(
PE_nt_headers
)
);
break
;
case
IMAGE_DEBUG_TYPE_CODEVIEW
:
dump_codeview
(
idd
->
PointerToRawData
,
idd
->
SizeOfData
);
...
...
@@ -1383,9 +1383,7 @@ static void dump_debug(void)
unsigned
i
;
const
IMAGE_SECTION_HEADER
*
sectHead
;
sectHead
=
(
const
IMAGE_SECTION_HEADER
*
)
((
const
char
*
)
PE_nt_headers
+
sizeof
(
DWORD
)
+
sizeof
(
IMAGE_FILE_HEADER
)
+
PE_nt_headers
->
FileHeader
.
SizeOfOptionalHeader
);
sectHead
=
IMAGE_FIRST_SECTION
(
PE_nt_headers
);
for
(
i
=
0
;
i
<
PE_nt_headers
->
FileHeader
.
NumberOfSections
;
i
++
,
sectHead
++
)
{
...
...
@@ -1456,8 +1454,7 @@ void pe_dump(void)
{
dump_pe_header
();
/* FIXME: should check ptr */
dump_sections
(
PRD
(
0
,
1
),
(
const
char
*
)
PE_nt_headers
+
sizeof
(
DWORD
)
+
sizeof
(
IMAGE_FILE_HEADER
)
+
PE_nt_headers
->
FileHeader
.
SizeOfOptionalHeader
,
dump_sections
(
PRD
(
0
,
1
),
IMAGE_FIRST_SECTION
(
PE_nt_headers
),
PE_nt_headers
->
FileHeader
.
NumberOfSections
);
}
else
if
(
!
globals
.
dumpsect
)
...
...
tools/winedump/winedump.h
View file @
0957cd03
...
...
@@ -260,7 +260,8 @@ void codeview_dump_linetab2(const char* linetab, DWORD size, const ch
void
dump_stabs
(
const
void
*
pv_stabs
,
unsigned
szstabs
,
const
char
*
stabstr
,
unsigned
szstr
);
void
dump_codeview
(
unsigned
long
ptr
,
unsigned
long
len
);
void
dump_coff
(
unsigned
long
coffbase
,
unsigned
long
len
,
const
void
*
sect_map
);
void
dump_coff
(
unsigned
long
coffbase
,
unsigned
long
len
,
const
IMAGE_SECTION_HEADER
*
sectHead
);
void
dump_coff_symbol_table
(
const
IMAGE_SYMBOL
*
coff_symbols
,
unsigned
num_sym
,
const
IMAGE_SECTION_HEADER
*
sectHead
);
void
dump_frame_pointer_omission
(
unsigned
long
base
,
unsigned
long
len
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment