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
036392c5
Commit
036392c5
authored
Mar 27, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbghelp: Added preliminary CFA management.
parent
0eef5d68
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
cpu_x86_64.c
dlls/dbghelp/cpu_x86_64.c
+18
-1
dbghelp_private.h
dlls/dbghelp/dbghelp_private.h
+3
-0
dwarf.c
dlls/dbghelp/dwarf.c
+0
-0
No files found.
dlls/dbghelp/cpu_x86_64.c
View file @
036392c5
...
...
@@ -477,6 +477,8 @@ static BOOL interpret_function_table_entry(struct cpu_stack_walk* csw, LPSTACKFR
static
BOOL
x86_64_stack_walk
(
struct
cpu_stack_walk
*
csw
,
LPSTACKFRAME64
frame
,
CONTEXT
*
context
)
{
DWORD64
base
;
DWORD_PTR
cfa
;
unsigned
deltapc
=
0
;
/* sanity check */
if
(
curr_mode
>=
stm_done
)
return
FALSE
;
...
...
@@ -511,18 +513,33 @@ static BOOL x86_64_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame,
{
if
(
frame
->
AddrReturn
.
Offset
==
0
)
goto
done_err
;
frame
->
AddrPC
=
frame
->
AddrReturn
;
deltapc
=
1
;
}
if
(
frame
->
AddrPC
.
Offset
&&
(
base
=
sw_module_base
(
csw
,
frame
->
AddrPC
.
Offset
)))
frame
->
FuncTableEntry
=
sw_table_access
(
csw
,
frame
->
AddrPC
.
Offset
);
else
frame
->
FuncTableEntry
=
NULL
;
frame
->
AddrStack
.
Mode
=
frame
->
AddrFrame
.
Mode
=
frame
->
AddrReturn
.
Mode
=
AddrModeFlat
;
if
(
frame
->
FuncTableEntry
)
{
if
(
!
interpret_function_table_entry
(
csw
,
frame
,
context
,
frame
->
FuncTableEntry
,
base
))
goto
done_err
;
}
/* FIXME: should check "native" debug format for native modules */
else
if
(
dwarf2_virtual_unwind
(
csw
,
frame
->
AddrPC
.
Offset
-
deltapc
,
context
,
&
cfa
))
{
frame
->
AddrStack
.
Offset
=
context
->
Rsp
=
cfa
;
frame
->
AddrReturn
.
Offset
=
context
->
Rip
;
TRACE
(
"next function rip=%016lx
\n
"
,
context
->
Rip
);
TRACE
(
" rax=%016lx rbx=%016lx rcx=%016lx rdx=%016lx
\n
"
,
context
->
Rax
,
context
->
Rbx
,
context
->
Rcx
,
context
->
Rdx
);
TRACE
(
" rsi=%016lx rdi=%016lx rbp=%016lx rsp=%016lx
\n
"
,
context
->
Rsi
,
context
->
Rdi
,
context
->
Rbp
,
context
->
Rsp
);
TRACE
(
" r8=%016lx r9=%016lx r10=%016lx r11=%016lx
\n
"
,
context
->
R8
,
context
->
R9
,
context
->
R10
,
context
->
R11
);
TRACE
(
" r12=%016lx r13=%016lx r14=%016lx r15=%016lx
\n
"
,
context
->
R12
,
context
->
R13
,
context
->
R14
,
context
->
R15
);
}
else
if
(
!
default_unwind
(
csw
,
frame
,
context
))
goto
done_err
;
memset
(
&
frame
->
Params
,
0
,
sizeof
(
frame
->
Params
));
...
...
dlls/dbghelp/dbghelp_private.h
View file @
036392c5
...
...
@@ -120,6 +120,7 @@ extern unsigned dbghelp_options;
#define SYMOPT_WINE_WITH_NATIVE_MODULES 0x40000000
enum
location_kind
{
loc_error
,
/* reg is the error code */
loc_unavailable
,
/* location is not available */
loc_absolute
,
/* offset is the location */
loc_register
,
/* reg is the location */
loc_regrel
,
/* [reg+offset] is the location */
...
...
@@ -601,6 +602,8 @@ extern BOOL stabs_parse(struct module* module, unsigned long load_offset
extern
BOOL
dwarf2_parse
(
struct
module
*
module
,
unsigned
long
load_offset
,
const
struct
elf_thunk_area
*
thunks
,
struct
image_file_map
*
fmap
);
extern
BOOL
dwarf2_virtual_unwind
(
struct
cpu_stack_walk
*
csw
,
DWORD_PTR
ip
,
CONTEXT
*
context
,
ULONG_PTR
*
cfa
);
/* stack.c */
extern
BOOL
sw_read_mem
(
struct
cpu_stack_walk
*
csw
,
DWORD64
addr
,
void
*
ptr
,
DWORD
sz
);
...
...
dlls/dbghelp/dwarf.c
View file @
036392c5
This diff is collapsed.
Click to expand it.
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