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
8e7b2e0f
Commit
8e7b2e0f
authored
Nov 29, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 30, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Get rid of long int issues on 64bit platforms.
parent
bacca342
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
78 additions
and
73 deletions
+78
-73
Makefile.in
dlls/dbghelp/Makefile.in
+0
-1
coff.c
dlls/dbghelp/coff.c
+4
-4
dbghelp.c
dlls/dbghelp/dbghelp.c
+3
-3
dwarf.c
dlls/dbghelp/dwarf.c
+1
-1
elf_module.c
dlls/dbghelp/elf_module.c
+3
-3
image.c
dlls/dbghelp/image.c
+1
-1
memory.c
dlls/dbghelp/memory.c
+1
-1
minidump.c
dlls/dbghelp/minidump.c
+4
-4
module.c
dlls/dbghelp/module.c
+5
-5
msc.c
dlls/dbghelp/msc.c
+10
-10
path.c
dlls/dbghelp/path.c
+5
-5
pe_module.c
dlls/dbghelp/pe_module.c
+1
-1
stack.c
dlls/dbghelp/stack.c
+29
-23
symbol.c
dlls/dbghelp/symbol.c
+11
-11
No files found.
dlls/dbghelp/Makefile.in
View file @
8e7b2e0f
...
...
@@ -5,7 +5,6 @@ VPATH = @srcdir@
MODULE
=
dbghelp.dll
IMPORTLIB
=
libdbghelp.
$(IMPLIBEXT)
IMPORTS
=
psapi kernel32 ntdll
EXTRADEFS
=
-DWINE_NO_LONG_AS_INT
C_SRCS
=
\
coff.c
\
...
...
dlls/dbghelp/coff.c
View file @
8e7b2e0f
...
...
@@ -220,15 +220,15 @@ BOOL coff_process_info(const struct msc_debug_info* msc_dbg)
*/
const
char
*
fn
;
fn
=
source_get
(
msc_dbg
->
module
,
fn
=
source_get
(
msc_dbg
->
module
,
coff_files
.
files
[
curr_file_idx
].
compiland
->
source
);
TRACE
(
"Duplicating sect from %s: %
l
x %x %x %d %d
\n
"
,
TRACE
(
"Duplicating sect from %s: %x %x %x %d %d
\n
"
,
fn
,
aux
->
Section
.
Length
,
aux
->
Section
.
NumberOfRelocations
,
aux
->
Section
.
NumberOfLinenumbers
,
aux
->
Section
.
Number
,
aux
->
Section
.
Selection
);
TRACE
(
"More sect %d %s %08
l
x %d %d %d
\n
"
,
TRACE
(
"More sect %d %s %08x %d %d %d
\n
"
,
coff_sym
->
SectionNumber
,
coff_get_name
(
coff_sym
,
coff_strtab
),
coff_sym
->
Value
,
coff_sym
->
Type
,
...
...
@@ -242,7 +242,7 @@ BOOL coff_process_info(const struct msc_debug_info* msc_dbg)
}
else
{
TRACE
(
"New text sect from %s: %
l
x %x %x %d %d
\n
"
,
TRACE
(
"New text sect from %s: %x %x %x %d %d
\n
"
,
source_get
(
msc_dbg
->
module
,
coff_files
.
files
[
curr_file_idx
].
compiland
->
source
),
aux
->
Section
.
Length
,
aux
->
Section
.
NumberOfRelocations
,
...
...
dlls/dbghelp/dbghelp.c
View file @
8e7b2e0f
...
...
@@ -485,7 +485,7 @@ static BOOL CALLBACK reg_cb64to32(HANDLE hProcess, ULONG action, ULONG64 data, U
case
CBA_EVENT
:
case
CBA_READ_MEMORY
:
default:
FIXME
(
"No mapping for action %
l
u
\n
"
,
action
);
FIXME
(
"No mapping for action %u
\n
"
,
action
);
return
FALSE
;
}
return
cb32
(
hProcess
,
action
,
(
PVOID
)
data32
,
(
PVOID
)
user32
);
...
...
@@ -496,7 +496,7 @@ static BOOL CALLBACK reg_cb64to32(HANDLE hProcess, ULONG action, ULONG64 data, U
*/
BOOL
pcs_callback
(
const
struct
process
*
pcs
,
ULONG
action
,
void
*
data
)
{
TRACE
(
"%p %
l
u %p
\n
"
,
pcs
,
action
,
data
);
TRACE
(
"%p %u %p
\n
"
,
pcs
,
action
,
data
);
if
(
!
pcs
->
reg_cb
)
return
FALSE
;
if
(
pcs
->
reg_is_unicode
)
...
...
@@ -529,7 +529,7 @@ BOOL pcs_callback(const struct process* pcs, ULONG action, void* data)
case
CBA_EVENT
:
case
CBA_READ_MEMORY
:
default:
FIXME
(
"No mapping for action %
l
u
\n
"
,
action
);
FIXME
(
"No mapping for action %u
\n
"
,
action
);
return
FALSE
;
}
}
...
...
dlls/dbghelp/dwarf.c
View file @
8e7b2e0f
...
...
@@ -749,7 +749,7 @@ compute_location(dwarf2_traverse_context_t* ctx, struct location* loc,
if
(
!
ReadProcessMemory
(
hproc
,
(
void
*
)
addr
,
&
deref
,
sizeof
(
deref
),
NULL
))
{
WARN
(
"Couldn't read memory at %
l
x
\n
"
,
addr
);
WARN
(
"Couldn't read memory at %x
\n
"
,
addr
);
return
loc_err_cant_read
;
}
stack
[
++
stk
]
=
deref
;
...
...
dlls/dbghelp/elf_module.c
View file @
8e7b2e0f
...
...
@@ -610,9 +610,9 @@ static int elf_new_wine_thunks(struct module* module, struct hash_table* ht_symt
* Also, we check that we don't have two symbols, one local, the other
* global which is legal
*/
if
((
xsize
||
ste
->
symp
->
st_size
)
&&
if
((
xsize
||
ste
->
symp
->
st_size
)
&&
(
kind
==
(
ELF32_ST_BIND
(
ste
->
symp
->
st_info
)
==
STB_LOCAL
)
?
DataIsFileStatic
:
DataIsGlobal
))
FIXME
(
"Duplicate in %s: %s<%08
lx-%08x> %s<%s-%s>
\n
"
,
FIXME
(
"Duplicate in %s: %s<%08
x-%08x> %s<%s-%s>
\n
"
,
module
->
module
.
ModuleName
,
ste
->
ht_elt
.
name
,
addr
,
ste
->
symp
->
st_size
,
module
->
addr_sorttab
[
idx
]
->
hash_elt
.
name
,
...
...
@@ -810,7 +810,7 @@ static BOOL elf_load_debug_info_from_map(struct module* module,
if
(
fmap
->
with_crc
&&
(
fmap
->
crc
!=
calc_crc32
(
fmap
)))
{
ERR
(
"Bad CRC for module %s (got %08
l
x while expecting %08lx)
\n
"
,
ERR
(
"Bad CRC for module %s (got %08x while expecting %08lx)
\n
"
,
module
->
module
.
ImageName
,
calc_crc32
(
fmap
),
fmap
->
crc
);
/* we don't tolerate mis-matched files */
return
FALSE
;
...
...
dlls/dbghelp/image.c
View file @
8e7b2e0f
...
...
@@ -45,7 +45,7 @@ DWORD WINAPI GetTimestampForLoadedLibrary(HMODULE Module)
PIMAGE_DEBUG_INFORMATION
WINAPI
MapDebugInformation
(
HANDLE
FileHandle
,
LPSTR
FileName
,
LPSTR
SymbolPath
,
DWORD
ImageBase
)
{
FIXME
(
"(%p, %s, %s, 0x%08
l
x): stub
\n
"
,
FileHandle
,
FileName
,
SymbolPath
,
ImageBase
);
FIXME
(
"(%p, %s, %s, 0x%08x): stub
\n
"
,
FileHandle
,
FileName
,
SymbolPath
,
ImageBase
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
NULL
;
}
...
...
dlls/dbghelp/memory.c
View file @
8e7b2e0f
...
...
@@ -55,7 +55,7 @@ DWORD WINAPI addr_to_linear(HANDLE hProcess, HANDLE hThread, ADDRESS* addr)
FIXME
(
"Unsupported (yet) mode (%x)
\n
"
,
addr
->
Mode
);
return
0
;
}
FIXME
(
"Failed to linearize address %04x:%08
l
x (mode %x)
\n
"
,
FIXME
(
"Failed to linearize address %04x:%08x (mode %x)
\n
"
,
addr
->
Segment
,
addr
->
Offset
,
addr
->
Mode
);
return
0
;
}
dlls/dbghelp/minidump.c
View file @
8e7b2e0f
...
...
@@ -140,7 +140,7 @@ static BOOL fetch_thread_info(struct dump_context* dc, int thd_idx,
if
((
hThread
=
OpenThread
(
THREAD_ALL_ACCESS
,
FALSE
,
tid
))
==
NULL
)
{
FIXME
(
"Couldn't open thread %
lu (%lu)
\n
"
,
FIXME
(
"Couldn't open thread %
u (%u)
\n
"
,
dc
->
spi
->
ti
[
thd_idx
].
dwThreadID
,
GetLastError
());
return
FALSE
;
}
...
...
@@ -247,16 +247,16 @@ static BOOL fetch_elf_module_info_cb(const char* name, unsigned long base,
void
*
user
)
{
struct
dump_context
*
dc
=
(
struct
dump_context
*
)
user
;
DWORD
size
,
checksum
;
DWORD
rbase
,
size
,
checksum
;
/* FIXME: there's no relevant timestamp on ELF modules */
/* NB: if we have a non-null base from the live-target use it (whenever
* the ELF module is relocatable or not). If we have a null base (ELF
* module isn't relocatable) then grab its base address from ELF file
*/
if
(
!
elf_fetch_file_info
(
name
,
base
?
NULL
:
&
base
,
&
size
,
&
checksum
))
if
(
!
elf_fetch_file_info
(
name
,
&
r
base
,
&
size
,
&
checksum
))
size
=
checksum
=
0
;
add_module
(
dc
,
name
,
base
,
size
,
0
/* FIXME */
,
checksum
,
TRUE
);
add_module
(
dc
,
name
,
base
?
base
:
rbase
,
size
,
0
/* FIXME */
,
checksum
,
TRUE
);
return
TRUE
;
}
...
...
dlls/dbghelp/module.c
View file @
8e7b2e0f
...
...
@@ -393,8 +393,8 @@ DWORD WINAPI SymLoadModule(HANDLE hProcess, HANDLE hFile, const char* ImageName,
struct
process
*
pcs
;
struct
module
*
module
=
NULL
;
TRACE
(
"(%p %p %s %s %08
lx %08lx)
\n
"
,
hProcess
,
hFile
,
debugstr_a
(
ImageName
),
debugstr_a
(
ModuleName
),
TRACE
(
"(%p %p %s %s %08
x %08x)
\n
"
,
hProcess
,
hFile
,
debugstr_a
(
ImageName
),
debugstr_a
(
ModuleName
),
BaseOfDll
,
SizeOfDll
);
pcs
=
process_find_by_handle
(
hProcess
);
...
...
@@ -448,8 +448,8 @@ DWORD64 WINAPI SymLoadModuleEx(HANDLE hProcess, HANDLE hFile, PCSTR ImageName,
PCSTR
ModuleName
,
DWORD64
BaseOfDll
,
DWORD
DllSize
,
PMODLOAD_DATA
Data
,
DWORD
Flags
)
{
TRACE
(
"(%p %p %s %s %s %08
lx %p %08lx)
\n
"
,
hProcess
,
hFile
,
debugstr_a
(
ImageName
),
debugstr_a
(
ModuleName
),
TRACE
(
"(%p %p %s %s %s %08
x %p %08x)
\n
"
,
hProcess
,
hFile
,
debugstr_a
(
ImageName
),
debugstr_a
(
ModuleName
),
wine_dbgstr_longlong
(
BaseOfDll
),
DllSize
,
Data
,
Flags
);
if
(
Data
)
...
...
@@ -471,7 +471,7 @@ DWORD64 WINAPI SymLoadModuleEx(HANDLE hProcess, HANDLE hFile, PCSTR ImageName,
return
TRUE
;
}
if
(
Flags
&
~
(
SLMFLAG_VIRTUAL
))
FIXME
(
"Unsupported Flags %08
l
x for %s
\n
"
,
Flags
,
ImageName
);
FIXME
(
"Unsupported Flags %08x for %s
\n
"
,
Flags
,
ImageName
);
return
SymLoadModule
(
hProcess
,
hFile
,
ImageName
,
ModuleName
,
(
DWORD
)
BaseOfDll
,
DllSize
);
}
...
...
dlls/dbghelp/msc.c
View file @
8e7b2e0f
...
...
@@ -1728,7 +1728,7 @@ static void* pdb_read_ds_file(const struct PDB_DS_HEADER* pdb,
if
(
toc
->
file_size
[
file_nr
]
==
0
||
toc
->
file_size
[
file_nr
]
==
0xFFFFFFFF
)
{
FIXME
(
">>> requesting NULL stream (%
l
u)
\n
"
,
file_nr
);
FIXME
(
">>> requesting NULL stream (%u)
\n
"
,
file_nr
);
return
NULL
;
}
block_list
=
&
toc
->
file_size
[
toc
->
num_files
];
...
...
@@ -1925,7 +1925,7 @@ static void pdb_process_types(const struct msc_debug_info* msc_dbg,
case
19990903
:
break
;
default:
ERR
(
"-Unknown type info version %
l
d
\n
"
,
types
.
version
);
ERR
(
"-Unknown type info version %d
\n
"
,
types
.
version
);
}
ctp
.
module
=
msc_dbg
->
module
;
...
...
@@ -1989,7 +1989,7 @@ static BOOL pdb_init(struct pdb_lookup* pdb_lookup, const char* image, BOOL do_f
case
19970604
:
/* VC 6.0 */
break
;
default:
ERR
(
"-Unknown root block version %
l
d
\n
"
,
root
->
Version
);
ERR
(
"-Unknown root block version %d
\n
"
,
root
->
Version
);
}
if
(
do_fill
)
{
...
...
@@ -2001,7 +2001,7 @@ static BOOL pdb_init(struct pdb_lookup* pdb_lookup, const char* image, BOOL do_f
pdb_lookup
->
u
.
jg
.
timestamp
!=
root
->
TimeDateStamp
||
pdb_lookup
->
age
!=
root
->
Age
)
ret
=
FALSE
;
TRACE
(
"found JG/%c for %s: age=%
lx timestamp=%l
x
\n
"
,
TRACE
(
"found JG/%c for %s: age=%
x timestamp=%
x
\n
"
,
do_fill
?
'f'
:
'-'
,
pdb_lookup
->
filename
,
root
->
Age
,
root
->
TimeDateStamp
);
pdb_free
(
root
);
...
...
@@ -2026,7 +2026,7 @@ static BOOL pdb_init(struct pdb_lookup* pdb_lookup, const char* image, BOOL do_f
case
20000404
:
break
;
default:
ERR
(
"-Unknown root block version %
l
d
\n
"
,
root
->
Version
);
ERR
(
"-Unknown root block version %d
\n
"
,
root
->
Version
);
}
if
(
do_fill
)
{
...
...
@@ -2038,7 +2038,7 @@ static BOOL pdb_init(struct pdb_lookup* pdb_lookup, const char* image, BOOL do_f
memcmp
(
&
pdb_lookup
->
u
.
ds
.
guid
,
&
root
->
guid
,
sizeof
(
GUID
))
||
pdb_lookup
->
age
!=
root
->
Age
)
ret
=
FALSE
;
TRACE
(
"found DS/%c for %s: age=%
l
x guid=%s
\n
"
,
TRACE
(
"found DS/%c for %s: age=%x guid=%s
\n
"
,
do_fill
?
'f'
:
'-'
,
pdb_lookup
->
filename
,
root
->
Age
,
debugstr_guid
(
&
root
->
guid
));
pdb_free
(
root
);
...
...
@@ -2111,7 +2111,7 @@ static void pdb_process_symbol_imports(const struct process* pcs,
imp_pdb_lookup
.
kind
=
PDB_JG
;
imp_pdb_lookup
.
u
.
jg
.
timestamp
=
imp
->
TimeDateStamp
;
imp_pdb_lookup
.
age
=
imp
->
Age
;
TRACE
(
"got for %s: age=%
lu ts=%l
x
\n
"
,
TRACE
(
"got for %s: age=%
u ts=%
x
\n
"
,
imp
->
filename
,
imp
->
Age
,
imp
->
TimeDateStamp
);
pdb_process_internal
(
pcs
,
msc_dbg
,
&
imp_pdb_lookup
,
i
);
}
...
...
@@ -2164,7 +2164,7 @@ static BOOL pdb_process_internal(const struct process* pcs,
case
19990903
:
break
;
default:
ERR
(
"-Unknown symbol info version %
ld %08lx
\n
"
,
ERR
(
"-Unknown symbol info version %
d %08x
\n
"
,
symbols
.
version
,
symbols
.
version
);
}
...
...
@@ -2404,7 +2404,7 @@ static BOOL codeview_process_info(const struct process* pcs,
{
const
CODEVIEW_HEADER_RSDS
*
rsds
=
(
const
CODEVIEW_HEADER_RSDS
*
)
msc_dbg
->
root
;
TRACE
(
"Got RSDS type of PDB file: guid=%s unk=%08
l
x name=%s
\n
"
,
TRACE
(
"Got RSDS type of PDB file: guid=%s unk=%08x name=%s
\n
"
,
wine_dbgstr_guid
(
&
rsds
->
guid
),
rsds
->
unknown
,
rsds
->
name
);
pdb_lookup
.
filename
=
rsds
->
name
;
pdb_lookup
.
kind
=
PDB_DS
;
...
...
@@ -2415,7 +2415,7 @@ static BOOL codeview_process_info(const struct process* pcs,
break
;
}
default:
ERR
(
"Unknown CODEVIEW signature %08
l
X in module %s
\n
"
,
ERR
(
"Unknown CODEVIEW signature %08X in module %s
\n
"
,
cv
->
dwSignature
,
msc_dbg
->
module
->
module
.
ModuleName
);
break
;
}
...
...
dlls/dbghelp/path.c
View file @
8e7b2e0f
...
...
@@ -270,7 +270,7 @@ static BOOL CALLBACK sffip_cb(LPCSTR buffer, void* user)
{
if
(
checksum
!=
(
DWORD_PTR
)
s
->
id
)
{
WARN
(
"Found %s, but wrong checksums: %08
l
x %08lx
\n
"
,
WARN
(
"Found %s, but wrong checksums: %08x %08lx
\n
"
,
buffer
,
checksum
,
(
DWORD_PTR
)
s
->
id
);
return
FALSE
;
}
...
...
@@ -298,7 +298,7 @@ static BOOL CALLBACK sffip_cb(LPCSTR buffer, void* user)
}
if
(
pdb_lookup
.
u
.
jg
.
timestamp
!=
(
DWORD_PTR
)
s
->
id
)
{
WARN
(
"Found %s, but wrong signature: %08
l
x %08lx
\n
"
,
WARN
(
"Found %s, but wrong signature: %08x %08lx
\n
"
,
buffer
,
pdb_lookup
.
u
.
jg
.
timestamp
,
(
DWORD_PTR
)
s
->
id
);
return
FALSE
;
}
...
...
@@ -320,7 +320,7 @@ static BOOL CALLBACK sffip_cb(LPCSTR buffer, void* user)
}
if
(
pdb_lookup
.
age
!=
s
->
two
)
{
WARN
(
"Found %s, but wrong age: %08
lx %08l
x
\n
"
,
WARN
(
"Found %s, but wrong age: %08
x %08
x
\n
"
,
buffer
,
pdb_lookup
.
age
,
s
->
two
);
return
FALSE
;
}
...
...
@@ -353,8 +353,8 @@ BOOL WINAPI SymFindFileInPath(HANDLE hProcess, PCSTR inSearchPath, PCSTR full_pa
const
char
*
filename
;
const
char
*
searchPath
=
inSearchPath
;
TRACE
(
"(%p %s %s %p %08
lx %08lx %08l
x %p %p %p)
\n
"
,
hProcess
,
searchPath
,
full_path
,
id
,
two
,
three
,
flags
,
TRACE
(
"(%p %s %s %p %08
x %08x %08
x %p %p %p)
\n
"
,
hProcess
,
searchPath
,
full_path
,
id
,
two
,
three
,
flags
,
buffer
,
cb
,
user
);
if
(
!
pcs
)
return
FALSE
;
...
...
dlls/dbghelp/pe_module.c
View file @
8e7b2e0f
...
...
@@ -266,7 +266,7 @@ static BOOL pe_load_export_debug_info(const struct process* pcs,
for
(
j
=
0
;
j
<
exports
->
NumberOfNames
;
j
++
)
if
((
ordinals
[
j
]
==
i
)
&&
names
[
j
])
break
;
if
(
j
<
exports
->
NumberOfNames
)
continue
;
snprintf
(
buffer
,
sizeof
(
buffer
),
"%
l
d"
,
i
+
exports
->
Base
);
snprintf
(
buffer
,
sizeof
(
buffer
),
"%d"
,
i
+
exports
->
Base
);
symt_new_public
(
module
,
NULL
,
buffer
,
base
+
(
DWORD
)
functions
[
i
],
1
,
TRUE
/* FIXME */
,
TRUE
/* FIXME */
);
}
...
...
dlls/dbghelp/stack.c
View file @
8e7b2e0f
...
...
@@ -45,13 +45,13 @@ static const char* wine_dbgstr_addr(const ADDRESS* addr)
switch
(
addr
->
Mode
)
{
case
AddrModeFlat
:
return
wine_dbg_sprintf
(
"flat<%08
l
x>"
,
addr
->
Offset
);
return
wine_dbg_sprintf
(
"flat<%08x>"
,
addr
->
Offset
);
case
AddrMode1616
:
return
wine_dbg_sprintf
(
"1616<%04x:%04
l
x>"
,
addr
->
Segment
,
addr
->
Offset
);
return
wine_dbg_sprintf
(
"1616<%04x:%04x>"
,
addr
->
Segment
,
addr
->
Offset
);
case
AddrMode1632
:
return
wine_dbg_sprintf
(
"1632<%04x:%08
l
x>"
,
addr
->
Segment
,
addr
->
Offset
);
return
wine_dbg_sprintf
(
"1632<%04x:%08x>"
,
addr
->
Segment
,
addr
->
Offset
);
case
AddrModeReal
:
return
wine_dbg_sprintf
(
"real<%04x:%04
l
x>"
,
addr
->
Segment
,
addr
->
Offset
);
return
wine_dbg_sprintf
(
"real<%04x:%04x>"
,
addr
->
Segment
,
addr
->
Offset
);
default:
return
"unknown"
;
}
...
...
@@ -60,13 +60,19 @@ static const char* wine_dbgstr_addr(const ADDRESS* addr)
static
BOOL
CALLBACK
read_mem
(
HANDLE
hProcess
,
DWORD
addr
,
void
*
buffer
,
DWORD
size
,
LPDWORD
nread
)
{
return
ReadProcessMemory
(
hProcess
,
(
void
*
)
addr
,
buffer
,
size
,
nread
);
SIZE_T
r
;
if
(
!
ReadProcessMemory
(
hProcess
,
(
void
*
)
addr
,
buffer
,
size
,
&
r
))
return
FALSE
;
*
nread
=
r
;
return
TRUE
;
}
static
BOOL
CALLBACK
read_mem64
(
HANDLE
hProcess
,
DWORD64
addr
,
void
*
buffer
,
DWORD
size
,
LPDWORD
nread
)
{
return
ReadProcessMemory
(
hProcess
,
(
void
*
)(
DWORD_PTR
)
addr
,
buffer
,
size
,
nread
);
SIZE_T
r
;
if
(
!
ReadProcessMemory
(
hProcess
,
(
void
*
)(
DWORD_PTR
)
addr
,
buffer
,
size
,
&
r
))
return
FALSE
;
*
nread
=
r
;
return
TRUE
;
}
/* indexes in Reserved array */
...
...
@@ -167,8 +173,8 @@ static BOOL stack_walk(struct stack_walk_callback* cb, LPSTACKFRAME frame)
/* sanity check */
if
(
curr_mode
>=
stm_done
)
return
FALSE
;
TRACE
(
"Enter: PC=%s Frame=%s Return=%s Stack=%s Mode=%s cSwitch=%08
lx nSwitch=%08l
x
\n
"
,
wine_dbgstr_addr
(
&
frame
->
AddrPC
),
TRACE
(
"Enter: PC=%s Frame=%s Return=%s Stack=%s Mode=%s cSwitch=%08
x nSwitch=%08
x
\n
"
,
wine_dbgstr_addr
(
&
frame
->
AddrPC
),
wine_dbgstr_addr
(
&
frame
->
AddrFrame
),
wine_dbgstr_addr
(
&
frame
->
AddrReturn
),
wine_dbgstr_addr
(
&
frame
->
AddrStack
),
...
...
@@ -206,7 +212,7 @@ static BOOL stack_walk(struct stack_walk_callback* cb, LPSTACKFRAME frame)
{
if
(
!
sw_read_mem
(
cb
,
next_switch
,
&
frame32
,
sizeof
(
frame32
)))
{
WARN
(
"Bad stack frame 0x%08
l
x
\n
"
,
next_switch
);
WARN
(
"Bad stack frame 0x%08x
\n
"
,
next_switch
);
goto
done_err
;
}
curr_switch
=
(
DWORD
)
frame32
.
frame16
;
...
...
@@ -224,7 +230,7 @@ static BOOL stack_walk(struct stack_walk_callback* cb, LPSTACKFRAME frame)
p
=
sw_xlat_addr
(
cb
,
&
tmp
);
if
(
!
sw_read_mem
(
cb
,
p
,
&
frame16
,
sizeof
(
frame16
)))
{
WARN
(
"Bad stack frame 0x%08
l
x
\n
"
,
p
);
WARN
(
"Bad stack frame 0x%08x
\n
"
,
p
);
goto
done_err
;
}
curr_switch
=
(
DWORD
)
frame16
.
frame32
;
...
...
@@ -266,7 +272,7 @@ static BOOL stack_walk(struct stack_walk_callback* cb, LPSTACKFRAME frame)
{
if
(
!
sw_read_mem
(
cb
,
next_switch
,
&
frame32
,
sizeof
(
frame32
)))
{
WARN
(
"Bad stack frame 0x%08
l
x
\n
"
,
next_switch
);
WARN
(
"Bad stack frame 0x%08x
\n
"
,
next_switch
);
goto
done_err
;
}
...
...
@@ -290,7 +296,7 @@ static BOOL stack_walk(struct stack_walk_callback* cb, LPSTACKFRAME frame)
if
(
!
sw_read_mem
(
cb
,
p
,
&
frame16
,
sizeof
(
frame16
)))
{
WARN
(
"Bad stack frame 0x%08
l
x
\n
"
,
p
);
WARN
(
"Bad stack frame 0x%08x
\n
"
,
p
);
goto
done_err
;
}
curr_switch
=
(
DWORD
)
frame16
.
frame32
;
...
...
@@ -307,16 +313,16 @@ static BOOL stack_walk(struct stack_walk_callback* cb, LPSTACKFRAME frame)
if
(
!
sw_read_mem
(
cb
,
p
,
&
frame16
,
sizeof
(
frame16
)))
{
WARN
(
"Bad stack frame 0x%08
l
x
\n
"
,
p
);
WARN
(
"Bad stack frame 0x%08x
\n
"
,
p
);
goto
done_err
;
}
TRACE
(
"Got a 16 bit stack switch:"
"
\n\t
frame32: %08lx"
"
\n\t
edx:%08
lx ecx:%08lx ebp:%08l
x"
"
\n\t
edx:%08
x ecx:%08x ebp:%08
x"
"
\n\t
ds:%04x es:%04x fs:%04x gs:%04x"
"
\n\t
call_from_ip:%08
lx module_cs:%04lx relay=%08l
x"
"
\n\t
entry_ip:%04x entry_point:%08
l
x"
"
\n\t
call_from_ip:%08
x module_cs:%04x relay=%08
x"
"
\n\t
entry_ip:%04x entry_point:%08x"
"
\n\t
bp:%04x ip:%04x cs:%04x
\n
"
,
(
unsigned
long
)
frame16
.
frame32
,
frame16
.
edx
,
frame16
.
ecx
,
frame16
.
ebp
,
...
...
@@ -343,7 +349,7 @@ static BOOL stack_walk(struct stack_walk_callback* cb, LPSTACKFRAME frame)
next_switch
=
curr_switch
;
if
(
!
sw_read_mem
(
cb
,
next_switch
,
&
frame32
,
sizeof
(
frame32
)))
{
WARN
(
"Bad stack frame 0x%08
l
x
\n
"
,
next_switch
);
WARN
(
"Bad stack frame 0x%08x
\n
"
,
next_switch
);
goto
done_err
;
}
curr_switch
=
(
DWORD
)
frame32
.
frame16
;
...
...
@@ -427,10 +433,10 @@ static BOOL stack_walk(struct stack_walk_callback* cb, LPSTACKFRAME frame)
if
(
!
sw_read_mem
(
cb
,
frame
->
AddrFrame
.
Offset
+
sizeof
(
DWORD
),
&
frame
->
AddrReturn
.
Offset
,
sizeof
(
DWORD
)))
{
WARN
(
"Cannot read new frame offset %08
l
x
\n
"
,
frame
->
AddrFrame
.
Offset
+
sizeof
(
DWORD
));
WARN
(
"Cannot read new frame offset %08x
\n
"
,
frame
->
AddrFrame
.
Offset
+
sizeof
(
DWORD
));
goto
done_err
;
}
sw_read_mem
(
cb
,
frame
->
AddrFrame
.
Offset
+
2
*
sizeof
(
DWORD
),
sw_read_mem
(
cb
,
frame
->
AddrFrame
.
Offset
+
2
*
sizeof
(
DWORD
),
frame
->
Params
,
sizeof
(
frame
->
Params
));
}
...
...
@@ -442,8 +448,8 @@ static BOOL stack_walk(struct stack_walk_callback* cb, LPSTACKFRAME frame)
else
frame
->
FuncTableEntry
=
NULL
;
TRACE
(
"Leave: PC=%s Frame=%s Return=%s Stack=%s Mode=%s cSwitch=%08
lx nSwitch=%08l
x FuncTable=%p
\n
"
,
wine_dbgstr_addr
(
&
frame
->
AddrPC
),
TRACE
(
"Leave: PC=%s Frame=%s Return=%s Stack=%s Mode=%s cSwitch=%08
x nSwitch=%08
x FuncTable=%p
\n
"
,
wine_dbgstr_addr
(
&
frame
->
AddrPC
),
wine_dbgstr_addr
(
&
frame
->
AddrFrame
),
wine_dbgstr_addr
(
&
frame
->
AddrReturn
),
wine_dbgstr_addr
(
&
frame
->
AddrStack
),
...
...
@@ -468,7 +474,7 @@ BOOL WINAPI StackWalk(DWORD MachineType, HANDLE hProcess, HANDLE hThread,
{
struct
stack_walk_callback
swcb
;
TRACE
(
"(%
l
d, %p, %p, %p, %p, %p, %p, %p, %p)
\n
"
,
TRACE
(
"(%d, %p, %p, %p, %p, %p, %p, %p, %p)
\n
"
,
MachineType
,
hProcess
,
hThread
,
frame
,
ctx
,
f_read_mem
,
FunctionTableAccessRoutine
,
GetModuleBaseRoutine
,
f_xlat_adr
);
...
...
@@ -506,7 +512,7 @@ BOOL WINAPI StackWalk64(DWORD MachineType, HANDLE hProcess, HANDLE hThread,
STACKFRAME
frame32
;
BOOL
ret
;
TRACE
(
"(%
l
d, %p, %p, %p, %p, %p, %p, %p, %p)
\n
"
,
TRACE
(
"(%d, %p, %p, %p, %p, %p, %p, %p, %p)
\n
"
,
MachineType
,
hProcess
,
hThread
,
frame64
,
ctx
,
f_read_mem
,
FunctionTableAccessRoutine
,
GetModuleBaseRoutine
,
f_xlat_adr
);
...
...
dlls/dbghelp/symbol.c
View file @
8e7b2e0f
...
...
@@ -563,7 +563,7 @@ static void symt_fill_sym_info(const struct module_pair* pair,
sym_info
->
Name
[
sym_info
->
NameLen
]
=
'\0'
;
}
}
TRACE_
(
dbghelp_symt
)(
"%p => %s %
l
u %s
\n
"
,
TRACE_
(
dbghelp_symt
)(
"%p => %s %u %s
\n
"
,
sym
,
sym_info
->
Name
,
sym_info
->
Size
,
wine_dbgstr_longlong
(
sym_info
->
Address
));
}
...
...
@@ -1254,7 +1254,7 @@ BOOL WINAPI SymGetLineFromAddr(HANDLE hProcess, DWORD dwAddr,
struct
module_pair
pair
;
int
idx
;
TRACE
(
"%p %08
l
x %p %p
\n
"
,
hProcess
,
dwAddr
,
pdwDisplacement
,
Line
);
TRACE
(
"%p %08x %p %p
\n
"
,
hProcess
,
dwAddr
,
pdwDisplacement
,
Line
);
if
(
Line
->
SizeOfStruct
<
sizeof
(
*
Line
))
return
FALSE
;
...
...
@@ -1479,7 +1479,7 @@ BOOL WINAPI SymGetLineNext64(HANDLE hProcess, PIMAGEHLP_LINE64 Line)
*/
PVOID
WINAPI
SymFunctionTableAccess
(
HANDLE
hProcess
,
DWORD
AddrBase
)
{
WARN
(
"(%p, 0x%08
l
x): stub
\n
"
,
hProcess
,
AddrBase
);
WARN
(
"(%p, 0x%08x): stub
\n
"
,
hProcess
,
AddrBase
);
return
NULL
;
}
...
...
@@ -1497,8 +1497,8 @@ PVOID WINAPI SymFunctionTableAccess64(HANDLE hProcess, DWORD64 AddrBase)
*/
BOOL
WINAPI
SymUnDName
(
PIMAGEHLP_SYMBOL
sym
,
LPSTR
UnDecName
,
DWORD
UnDecNameLength
)
{
TRACE
(
"(%p %s %
l
u)
\n
"
,
sym
,
UnDecName
,
UnDecNameLength
);
return
UnDecorateSymbolName
(
sym
->
Name
,
UnDecName
,
UnDecNameLength
,
TRACE
(
"(%p %s %u)
\n
"
,
sym
,
UnDecName
,
UnDecNameLength
);
return
UnDecorateSymbolName
(
sym
->
Name
,
UnDecName
,
UnDecNameLength
,
UNDNAME_COMPLETE
)
!=
0
;
}
...
...
@@ -1515,7 +1515,7 @@ DWORD WINAPI UnDecorateSymbolName(LPCSTR DecoratedName, LPSTR UnDecoratedName,
static
char
*
(
*
p_undname
)(
char
*
,
const
char
*
,
int
,
void
*
(
*
)(
size_t
),
void
(
*
)(
void
*
),
unsigned
short
);
static
const
WCHAR
szMsvcrt
[]
=
{
'm'
,
's'
,
'v'
,
'c'
,
'r'
,
't'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
TRACE
(
"(%s, %p, %
ld, 0x%08l
x)
\n
"
,
TRACE
(
"(%s, %p, %
d, 0x%08
x)
\n
"
,
debugstr_a
(
DecoratedName
),
UnDecoratedName
,
UndecoratedLength
,
Flags
);
if
(
!
p_undname
)
...
...
@@ -1559,14 +1559,14 @@ BOOL WINAPI SymSearch(HANDLE hProcess, ULONG64 BaseOfDll, DWORD Index,
{
struct
sym_enum
se
;
TRACE
(
"(%p %s %
lu %lu %s %s %p %p %l
x)
\n
"
,
hProcess
,
wine_dbgstr_longlong
(
BaseOfDll
),
Index
,
SymTag
,
Mask
,
TRACE
(
"(%p %s %
u %u %s %s %p %p %
x)
\n
"
,
hProcess
,
wine_dbgstr_longlong
(
BaseOfDll
),
Index
,
SymTag
,
Mask
,
wine_dbgstr_longlong
(
Address
),
EnumSymbolsCallback
,
UserContext
,
Options
);
if
(
Options
!=
SYMSEARCH_GLOBALSONLY
)
{
FIXME
(
"Unsupported searching with options (%
l
x)
\n
"
,
Options
);
FIXME
(
"Unsupported searching with options (%x)
\n
"
,
Options
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
@@ -1593,8 +1593,8 @@ BOOL WINAPI SymSearchW(HANDLE hProcess, ULONG64 BaseOfDll, DWORD Index,
BOOL
ret
=
FALSE
;
char
*
maskA
=
NULL
;
TRACE
(
"(%p %s %
lu %lu %s %s %p %p %l
x)
\n
"
,
hProcess
,
wine_dbgstr_longlong
(
BaseOfDll
),
Index
,
SymTag
,
debugstr_w
(
Mask
),
TRACE
(
"(%p %s %
u %u %s %s %p %p %
x)
\n
"
,
hProcess
,
wine_dbgstr_longlong
(
BaseOfDll
),
Index
,
SymTag
,
debugstr_w
(
Mask
),
wine_dbgstr_longlong
(
Address
),
EnumSymbolsCallback
,
UserContext
,
Options
);
...
...
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