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
b037912c
Commit
b037912c
authored
Dec 12, 2009
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Fix a couple of casts on 64bit platforms.
parent
c300f215
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
17 deletions
+17
-17
dbghelp.c
dlls/dbghelp/dbghelp.c
+1
-1
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+1
-1
dwarf.c
dlls/dbghelp/dwarf.c
+4
-4
minidump.c
dlls/dbghelp/minidump.c
+5
-5
pe_module.c
dlls/dbghelp/pe_module.c
+3
-3
stack.c
dlls/dbghelp/stack.c
+2
-2
symbol.c
dlls/dbghelp/symbol.c
+1
-1
No files found.
dlls/dbghelp/dbghelp.c
View file @
b037912c
...
...
@@ -479,7 +479,7 @@ static BOOL CALLBACK reg_cb64to32(HANDLE hProcess, ULONG action, ULONG64 data, U
case
CBA_DEFERRED_SYMBOL_LOAD_FAILURE
:
case
CBA_DEFERRED_SYMBOL_LOAD_PARTIAL
:
case
CBA_DEFERRED_SYMBOL_LOAD_START
:
idsl64
=
(
IMAGEHLP_DEFERRED_SYMBOL_LOAD64
*
)(
DWORD
)
data
;
idsl64
=
(
IMAGEHLP_DEFERRED_SYMBOL_LOAD64
*
)(
DWORD
_PTR
)
data
;
if
(
!
validate_addr64
(
idsl64
->
BaseOfImage
))
return
FALSE
;
idsl
.
SizeOfStruct
=
sizeof
(
idsl
);
...
...
dlls/dbghelp/dbghelp_private.h
View file @
b037912c
...
...
@@ -498,7 +498,7 @@ extern BOOL path_find_symbol_file(const struct process* pcs, PCSTR full_
BOOL
*
is_unmatched
);
/* pe_module.c */
extern
BOOL
pe_load_nt_header
(
HANDLE
hProc
,
DWORD
base
,
IMAGE_NT_HEADERS
*
nth
);
extern
BOOL
pe_load_nt_header
(
HANDLE
hProc
,
DWORD
64
base
,
IMAGE_NT_HEADERS
*
nth
);
extern
struct
module
*
pe_load_native_module
(
struct
process
*
pcs
,
const
WCHAR
*
name
,
HANDLE
hFile
,
DWORD
base
,
DWORD
size
);
...
...
dlls/dbghelp/dwarf.c
View file @
b037912c
...
...
@@ -654,7 +654,7 @@ static enum location_error
compute_location
(
dwarf2_traverse_context_t
*
ctx
,
struct
location
*
loc
,
HANDLE
hproc
,
const
struct
location
*
frame
)
{
unsigned
long
stack
[
64
];
DWORD_PTR
stack
[
64
];
unsigned
stk
;
unsigned
char
op
;
BOOL
piece_found
=
FALSE
;
...
...
@@ -767,12 +767,12 @@ compute_location(dwarf2_traverse_context_t* ctx, struct location* loc,
}
if
(
hproc
)
{
DWORD
addr
=
stack
[
stk
--
];
DWORD
deref
;
DWORD
_PTR
addr
=
stack
[
stk
--
];
DWORD
_PTR
deref
;
if
(
!
ReadProcessMemory
(
hproc
,
(
void
*
)
addr
,
&
deref
,
sizeof
(
deref
),
NULL
))
{
WARN
(
"Couldn't read memory at %x
\n
"
,
addr
);
WARN
(
"Couldn't read memory at %
l
x
\n
"
,
addr
);
return
loc_err_cant_read
;
}
stack
[
++
stk
]
=
deref
;
...
...
dlls/dbghelp/minidump.c
View file @
b037912c
...
...
@@ -34,7 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp);
struct
dump_memory
{
ULONG
base
;
ULONG
64
base
;
ULONG
size
;
ULONG
rva
;
};
...
...
@@ -42,7 +42,7 @@ struct dump_memory
struct
dump_module
{
unsigned
is_elf
;
ULONG
base
;
ULONG
64
base
;
ULONG
size
;
DWORD
timestamp
;
DWORD
checksum
;
...
...
@@ -251,7 +251,7 @@ static BOOL fetch_thread_info(struct dump_context* dc, int thd_idx,
* Add a module to a dump context
*/
static
BOOL
add_module
(
struct
dump_context
*
dc
,
const
WCHAR
*
name
,
DWORD
base
,
DWORD
size
,
DWORD
timestamp
,
DWORD
checksum
,
DWORD
64
base
,
DWORD
size
,
DWORD
timestamp
,
DWORD
checksum
,
BOOL
is_elf
)
{
if
(
!
dc
->
modules
)
...
...
@@ -272,7 +272,7 @@ static BOOL add_module(struct dump_context* dc, const WCHAR* name,
return
FALSE
;
}
if
(
is_elf
||
!
GetModuleFileNameExW
(
dc
->
hProcess
,
(
HMODULE
)
base
,
!
GetModuleFileNameExW
(
dc
->
hProcess
,
(
HMODULE
)
(
DWORD_PTR
)
base
,
dc
->
modules
[
dc
->
num_modules
].
name
,
sizeof
(
dc
->
modules
[
dc
->
num_modules
].
name
)
/
sizeof
(
WCHAR
)))
lstrcpynW
(
dc
->
modules
[
dc
->
num_modules
].
name
,
name
,
...
...
@@ -834,7 +834,7 @@ static unsigned dump_memory_info(struct dump_context* dc)
{
len
=
min
(
dc
->
mem
[
i
].
size
-
pos
,
sizeof
(
tmp
));
if
(
ReadProcessMemory
(
dc
->
hProcess
,
(
void
*
)(
dc
->
mem
[
i
].
base
+
pos
),
(
void
*
)(
DWORD_PTR
)(
dc
->
mem
[
i
].
base
+
pos
),
tmp
,
len
,
NULL
))
WriteFile
(
dc
->
hFile
,
tmp
,
len
,
&
written
,
NULL
);
}
...
...
dlls/dbghelp/pe_module.c
View file @
b037912c
...
...
@@ -432,13 +432,13 @@ struct module* pe_load_native_module(struct process* pcs, const WCHAR* name,
* pe_load_nt_header
*
*/
BOOL
pe_load_nt_header
(
HANDLE
hProc
,
DWORD
base
,
IMAGE_NT_HEADERS
*
nth
)
BOOL
pe_load_nt_header
(
HANDLE
hProc
,
DWORD
64
base
,
IMAGE_NT_HEADERS
*
nth
)
{
IMAGE_DOS_HEADER
dos
;
return
ReadProcessMemory
(
hProc
,
(
char
*
)
base
,
&
dos
,
sizeof
(
dos
),
NULL
)
&&
return
ReadProcessMemory
(
hProc
,
(
char
*
)
(
DWORD_PTR
)
base
,
&
dos
,
sizeof
(
dos
),
NULL
)
&&
dos
.
e_magic
==
IMAGE_DOS_SIGNATURE
&&
ReadProcessMemory
(
hProc
,
(
char
*
)(
base
+
dos
.
e_lfanew
),
ReadProcessMemory
(
hProc
,
(
char
*
)(
DWORD_PTR
)(
base
+
dos
.
e_lfanew
),
nth
,
sizeof
(
*
nth
),
NULL
)
&&
nth
->
Signature
==
IMAGE_NT_SIGNATURE
;
}
...
...
dlls/dbghelp/stack.c
View file @
b037912c
...
...
@@ -261,7 +261,7 @@ static BOOL stack_walk(struct stack_walk_callback* cb, LPSTACKFRAME frame)
WARN
(
"Bad stack frame 0x%08x
\n
"
,
p
);
goto
done_err
;
}
curr_switch
=
(
DWORD
)
frame16
.
frame32
;
curr_switch
=
(
DWORD
_PTR
)
frame16
.
frame32
;
if
(
!
sw_read_mem
(
cb
,
curr_switch
,
&
ch
,
sizeof
(
ch
)))
curr_switch
=
0xFFFFFFFF
;
...
...
@@ -327,7 +327,7 @@ static BOOL stack_walk(struct stack_walk_callback* cb, LPSTACKFRAME frame)
WARN
(
"Bad stack frame 0x%08x
\n
"
,
p
);
goto
done_err
;
}
curr_switch
=
(
DWORD
)
frame16
.
frame32
;
curr_switch
=
(
DWORD
_PTR
)
frame16
.
frame32
;
curr_mode
=
stm_32bit
;
if
(
!
sw_read_mem
(
cb
,
curr_switch
,
&
ch
,
sizeof
(
ch
)))
curr_switch
=
0
;
...
...
dlls/dbghelp/symbol.c
View file @
b037912c
...
...
@@ -702,7 +702,7 @@ static void symt_fill_sym_info(const struct module_pair* pair,
case
VT_UI4
:
sym_info
->
Value
=
(
ULONG
)
data
->
u
.
value
.
n1
.
n2
.
n3
.
ulVal
;
break
;
case
VT_UI2
:
sym_info
->
Value
=
(
ULONG
)
data
->
u
.
value
.
n1
.
n2
.
n3
.
uiVal
;
break
;
case
VT_UI1
:
sym_info
->
Value
=
(
ULONG
)
data
->
u
.
value
.
n1
.
n2
.
n3
.
bVal
;
break
;
case
VT_I1
|
VT_BYREF
:
sym_info
->
Value
=
(
ULONG
)
data
->
u
.
value
.
n1
.
n2
.
n3
.
byref
;
break
;
case
VT_I1
|
VT_BYREF
:
sym_info
->
Value
=
(
ULONG
64
)(
DWORD_PTR
)
data
->
u
.
value
.
n1
.
n2
.
n3
.
byref
;
break
;
case
VT_EMPTY
:
sym_info
->
Value
=
0
;
break
;
default:
FIXME
(
"Unsupported variant type (%u)
\n
"
,
data
->
u
.
value
.
n1
.
n2
.
vt
);
...
...
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