Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
55f8a1b8
Commit
55f8a1b8
authored
May 10, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
May 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Implemented SymGetLineFromAddrW64.
parent
7d4194f5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
1 deletion
+69
-1
dbghelp.c
dlls/dbghelp/dbghelp.c
+18
-0
dbghelp.spec
dlls/dbghelp/dbghelp.spec
+1
-1
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+4
-0
symbol.c
dlls/dbghelp/symbol.c
+36
-0
dbghelp.h
include/dbghelp.h
+10
-0
No files found.
dlls/dbghelp/dbghelp.c
View file @
55f8a1b8
...
...
@@ -116,6 +116,24 @@ BOOL validate_addr64(DWORD64 addr)
}
/******************************************************************
* fetch_buffer
*
* Ensures process' internal buffer is large enough.
*/
void
*
fetch_buffer
(
struct
process
*
pcs
,
unsigned
size
)
{
if
(
size
>
pcs
->
buffer_size
)
{
if
(
pcs
->
buffer
)
pcs
->
buffer
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
pcs
->
buffer
,
size
);
else
pcs
->
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
pcs
->
buffer_size
=
(
pcs
->
buffer
)
?
size
:
0
;
}
return
pcs
->
buffer
;
}
/******************************************************************
* SymSetSearchPathW (DBGHELP.@)
*
*/
...
...
dlls/dbghelp/dbghelp.spec
View file @
55f8a1b8
...
...
@@ -70,7 +70,7 @@
@ stub SymGetHomeDirectoryW
@ stdcall SymGetLineFromAddr(long long ptr ptr)
@ stdcall SymGetLineFromAddr64(long double ptr ptr)
@ st
ub SymGetLineFromAddrW64
@ st
dcall SymGetLineFromAddrW64(long double ptr ptr)
@ stub SymGetLineFromName
@ stub SymGetLineFromName64
@ stdcall SymGetLineNext(long ptr)
...
...
dlls/dbghelp/dbghelp_private.h
View file @
55f8a1b8
...
...
@@ -301,6 +301,9 @@ struct process
unsigned
long
dbg_hdr_addr
;
IMAGEHLP_STACK_FRAME
ctx_frame
;
unsigned
buffer_size
;
void
*
buffer
;
};
struct
line_info
...
...
@@ -327,6 +330,7 @@ extern struct process* process_find_by_handle(HANDLE hProcess);
extern
HANDLE
hMsvcrt
;
extern
BOOL
validate_addr64
(
DWORD64
addr
);
extern
BOOL
pcs_callback
(
const
struct
process
*
pcs
,
ULONG
action
,
void
*
data
);
extern
void
*
fetch_buffer
(
struct
process
*
pcs
,
unsigned
size
);
/* elf_module.c */
typedef
BOOL
(
*
elf_enum_modules_cb
)(
const
char
*
,
unsigned
long
addr
,
void
*
user
);
...
...
dlls/dbghelp/symbol.c
View file @
55f8a1b8
...
...
@@ -1170,6 +1170,22 @@ static void copy_line_64_from_32(IMAGEHLP_LINE64* l64, const IMAGEHLP_LINE* l32)
}
/******************************************************************
* copy_line_W64_from_32 (internal)
*
*/
static
void
copy_line_W64_from_32
(
struct
process
*
pcs
,
IMAGEHLP_LINEW64
*
l64
,
const
IMAGEHLP_LINE
*
l32
)
{
unsigned
len
;
l64
->
Key
=
l32
->
Key
;
l64
->
LineNumber
=
l32
->
LineNumber
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
l32
->
FileName
,
-
1
,
NULL
,
0
);
if
((
l64
->
FileName
=
fetch_buffer
(
pcs
,
len
*
sizeof
(
WCHAR
))))
MultiByteToWideChar
(
CP_ACP
,
0
,
l32
->
FileName
,
-
1
,
l64
->
FileName
,
len
);
l64
->
Address
=
l32
->
Address
;
}
/******************************************************************
* copy_line_32_from_64 (internal)
*
*/
...
...
@@ -1201,6 +1217,26 @@ BOOL WINAPI SymGetLineFromAddr64(HANDLE hProcess, DWORD64 dwAddr,
}
/******************************************************************
* SymGetLineFromAddrW64 (DBGHELP.@)
*
*/
BOOL
WINAPI
SymGetLineFromAddrW64
(
HANDLE
hProcess
,
DWORD64
dwAddr
,
PDWORD
pdwDisplacement
,
PIMAGEHLP_LINEW64
Line
)
{
struct
process
*
pcs
=
process_find_by_handle
(
hProcess
);
IMAGEHLP_LINE
line32
;
if
(
!
pcs
)
return
FALSE
;
if
(
Line
->
SizeOfStruct
<
sizeof
(
*
Line
))
return
FALSE
;
if
(
!
validate_addr64
(
dwAddr
))
return
FALSE
;
line32
.
SizeOfStruct
=
sizeof
(
line32
);
if
(
!
SymGetLineFromAddr
(
hProcess
,
(
DWORD
)
dwAddr
,
pdwDisplacement
,
&
line32
))
return
FALSE
;
copy_line_W64_from_32
(
pcs
,
Line
,
&
line32
);
return
TRUE
;
}
/******************************************************************
* SymGetLinePrev (DBGHELP.@)
*
*/
...
...
include/dbghelp.h
View file @
55f8a1b8
...
...
@@ -217,6 +217,15 @@ typedef struct _IMAGEHLP_LINE64
DWORD64
Address
;
}
IMAGEHLP_LINE64
,
*
PIMAGEHLP_LINE64
;
typedef
struct
_IMAGEHLP_LINEW64
{
DWORD
SizeOfStruct
;
PVOID
Key
;
DWORD
LineNumber
;
PWCHAR
FileName
;
DWORD64
Address
;
}
IMAGEHLP_LINEW64
,
*
PIMAGEHLP_LINEW64
;
typedef
struct
_SOURCEFILE
{
DWORD64
ModBase
;
...
...
@@ -945,6 +954,7 @@ BOOL WINAPI SymEnumSourceFiles(HANDLE, ULONG64, PCSTR, PSYM_ENUMSOURCEFILES_CALL
PVOID
);
BOOL
WINAPI
SymGetLineFromAddr
(
HANDLE
,
DWORD
,
PDWORD
,
PIMAGEHLP_LINE
);
BOOL
WINAPI
SymGetLineFromAddr64
(
HANDLE
,
DWORD64
,
PDWORD
,
PIMAGEHLP_LINE64
);
BOOL
WINAPI
SymGetLineFromAddrW64
(
HANDLE
,
DWORD64
,
PDWORD
,
PIMAGEHLP_LINEW64
);
BOOL
WINAPI
SymGetLinePrev
(
HANDLE
,
PIMAGEHLP_LINE
);
BOOL
WINAPI
SymGetLinePrev64
(
HANDLE
,
PIMAGEHLP_LINE64
);
BOOL
WINAPI
SymGetLineNext
(
HANDLE
,
PIMAGEHLP_LINE
);
...
...
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