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
12c3a012
Commit
12c3a012
authored
Dec 12, 2009
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Force 64bit line number information throughout the code to ease 64bit portability.
parent
91c7ff29
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
25 deletions
+26
-25
break.c
programs/winedbg/break.c
+2
-2
dbg.y
programs/winedbg/dbg.y
+2
-2
debugger.h
programs/winedbg/debugger.h
+2
-2
memory.c
programs/winedbg/memory.c
+2
-2
source.c
programs/winedbg/source.c
+4
-4
stack.c
programs/winedbg/stack.c
+3
-3
symbol.c
programs/winedbg/symbol.c
+9
-8
tgt_active.c
programs/winedbg/tgt_active.c
+2
-2
No files found.
programs/winedbg/break.c
View file @
12c3a012
...
...
@@ -299,14 +299,14 @@ void break_add_break_from_lineno(int lineno, BOOL swbp)
if
(
lineno
!=
-
1
)
{
IMAGEHLP_LINE
il
;
IMAGEHLP_LINE
64
il
;
DWORD
disp
;
DWORD_PTR
linear
=
(
DWORD_PTR
)
memory_to_linear_addr
(
&
bkln
.
addr
);
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
!
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
linear
,
&
disp
,
&
il
))
if
(
!
SymGetLineFromAddr
64
(
dbg_curr_process
->
handle
,
linear
,
&
disp
,
&
il
))
{
dbg_printf
(
"Unable to add breakpoint (unknown address %lx)
\n
"
,
linear
);
return
;
...
...
programs/winedbg/dbg.y
View file @
12c3a012
...
...
@@ -46,7 +46,7 @@ static void parser(const char*);
struct dbg_lvalue lvalue;
char* string;
INT_PTR integer;
IMAGEHLP_LINE
listing;
IMAGEHLP_LINE
64
listing;
struct expr* expression;
struct type_expr_t type;
}
...
...
@@ -184,7 +184,7 @@ list_arg:
| pathname ':' identifier { symbol_get_line($1, $3, &$$); }
| '*' expr_lvalue { DWORD disp; ADDRESS64 addr; $$.SizeOfStruct = sizeof($$);
types_extract_as_address(&$2, &addr);
SymGetLineFromAddr(dbg_curr_process->handle, (unsigned long)memory_to_linear_addr(& addr), &disp, & $$); }
SymGetLineFromAddr
64
(dbg_curr_process->handle, (unsigned long)memory_to_linear_addr(& addr), &disp, & $$); }
;
run_command:
...
...
programs/winedbg/debugger.h
View file @
12c3a012
...
...
@@ -375,7 +375,7 @@ extern void print_address(const ADDRESS64* addr, BOOLEAN with_line);
extern
void
print_basic
(
const
struct
dbg_lvalue
*
value
,
char
format
);
/* source.c */
extern
void
source_list
(
IMAGEHLP_LINE
*
src1
,
IMAGEHLP_LINE
*
src2
,
int
delta
);
extern
void
source_list
(
IMAGEHLP_LINE
64
*
src1
,
IMAGEHLP_LINE64
*
src2
,
int
delta
);
extern
void
source_list_from_addr
(
const
ADDRESS64
*
addr
,
int
nlines
);
extern
void
source_show_path
(
void
);
extern
void
source_add_path
(
const
char
*
path
);
...
...
@@ -395,7 +395,7 @@ extern BOOL stack_get_current_symbol(SYMBOL_INFO* sym);
extern
enum
sym_get_lval
symbol_get_lvalue
(
const
char
*
name
,
const
int
lineno
,
struct
dbg_lvalue
*
addr
,
BOOL
bp_disp
);
extern
void
symbol_read_symtable
(
const
char
*
filename
,
unsigned
long
offset
);
extern
enum
dbg_line_status
symbol_get_function_line_status
(
const
ADDRESS64
*
addr
);
extern
BOOL
symbol_get_line
(
const
char
*
filename
,
const
char
*
func
,
IMAGEHLP_LINE
*
ret
);
extern
BOOL
symbol_get_line
(
const
char
*
filename
,
const
char
*
func
,
IMAGEHLP_LINE
64
*
ret
);
extern
void
symbol_info
(
const
char
*
str
);
extern
void
symbol_print_local
(
const
SYMBOL_INFO
*
sym
,
ULONG_PTR
base
,
BOOL
detailed
);
extern
int
symbol_info_locals
(
void
);
...
...
programs/winedbg/memory.c
View file @
12c3a012
...
...
@@ -588,11 +588,11 @@ void print_address(const ADDRESS64* addr, BOOLEAN with_line)
if
(
disp64
)
dbg_printf
(
"+0x%lx"
,
(
DWORD_PTR
)
disp64
);
if
(
with_line
)
{
IMAGEHLP_LINE
il
;
IMAGEHLP_LINE
64
il
;
IMAGEHLP_MODULE
im
;
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
lin
,
&
disp
,
&
il
))
if
(
SymGetLineFromAddr
64
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
lin
,
&
disp
,
&
il
))
dbg_printf
(
" [%s:%u]"
,
il
.
FileName
,
il
.
LineNumber
);
im
.
SizeOfStruct
=
sizeof
(
im
);
if
(
SymGetModuleInfo
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
lin
,
&
im
))
...
...
programs/winedbg/source.c
View file @
12c3a012
...
...
@@ -286,7 +286,7 @@ static int source_display(const char* sourcefile, int start, int end)
return
rtn
;
}
void
source_list
(
IMAGEHLP_LINE
*
src1
,
IMAGEHLP_LINE
*
src2
,
int
delta
)
void
source_list
(
IMAGEHLP_LINE
64
*
src1
,
IMAGEHLP_LINE64
*
src2
,
int
delta
)
{
int
end
;
int
start
;
...
...
@@ -344,7 +344,7 @@ void source_list(IMAGEHLP_LINE* src1, IMAGEHLP_LINE* src2, int delta)
void
source_list_from_addr
(
const
ADDRESS64
*
addr
,
int
nlines
)
{
IMAGEHLP_LINE
il
;
IMAGEHLP_LINE
64
il
;
ADDRESS64
la
;
DWORD
disp
;
...
...
@@ -355,8 +355,8 @@ void source_list_from_addr(const ADDRESS64* addr, int nlines)
}
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
(
unsigned
long
)
memory_to_linear_addr
(
addr
),
if
(
SymGetLineFromAddr
64
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
memory_to_linear_addr
(
addr
),
&
disp
,
&
il
))
source_list
(
&
il
,
NULL
,
nlines
);
}
...
...
programs/winedbg/stack.c
View file @
12c3a012
...
...
@@ -232,7 +232,7 @@ static void stack_print_addr_and_args(int nf)
char
buffer
[
sizeof
(
SYMBOL_INFO
)
+
256
];
SYMBOL_INFO
*
si
=
(
SYMBOL_INFO
*
)
buffer
;
IMAGEHLP_STACK_FRAME
ihsf
;
IMAGEHLP_LINE
il
;
IMAGEHLP_LINE
64
il
;
IMAGEHLP_MODULE
im
;
DWORD64
disp64
;
...
...
@@ -263,8 +263,8 @@ static void stack_print_addr_and_args(int nf)
dbg_printf
(
")"
);
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
ihsf
.
InstructionOffset
,
&
disp
,
&
il
))
if
(
SymGetLineFromAddr
64
(
dbg_curr_process
->
handle
,
ihsf
.
InstructionOffset
,
&
disp
,
&
il
))
dbg_printf
(
" [%s:%u]"
,
il
.
FileName
,
il
.
LineNumber
);
dbg_printf
(
" in %s"
,
im
.
ModuleName
);
}
...
...
programs/winedbg/symbol.c
View file @
12c3a012
...
...
@@ -403,11 +403,11 @@ enum sym_get_lval symbol_get_lvalue(const char* name, const int lineno,
else
{
DWORD
disp
;
IMAGEHLP_LINE
il
;
IMAGEHLP_LINE
64
il
;
BOOL
found
=
FALSE
;
il
.
SizeOfStruct
=
sizeof
(
il
);
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
SymGetLineFromAddr
64
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
memory_to_linear_addr
(
&
sgv
.
syms
[
i
].
lvalue
.
addr
),
&
disp
,
&
il
);
do
...
...
@@ -418,7 +418,7 @@ enum sym_get_lval symbol_get_lvalue(const char* name, const int lineno,
found
=
TRUE
;
break
;
}
}
while
(
SymGetLineNext
(
dbg_curr_process
->
handle
,
&
il
));
}
while
(
SymGetLineNext
64
(
dbg_curr_process
->
handle
,
&
il
));
if
(
!
found
)
WINE_FIXME
(
"No line (%d) found for %s (setting to symbol start)
\n
"
,
lineno
,
name
);
...
...
@@ -521,7 +521,7 @@ void symbol_read_symtable(const char* filename, unsigned long offset)
*/
enum
dbg_line_status
symbol_get_function_line_status
(
const
ADDRESS64
*
addr
)
{
IMAGEHLP_LINE
il
;
IMAGEHLP_LINE
64
il
;
DWORD
disp
;
ULONG64
disp64
,
start
;
DWORD_PTR
lin
=
(
DWORD_PTR
)
memory_to_linear_addr
(
addr
);
...
...
@@ -552,7 +552,7 @@ enum dbg_line_status symbol_get_function_line_status(const ADDRESS64* addr)
return
dbg_no_line_info
;
}
/* we should have a function now */
if
(
!
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
lin
,
&
disp
,
&
il
))
if
(
!
SymGetLineFromAddr
64
(
dbg_curr_process
->
handle
,
lin
,
&
disp
,
&
il
))
return
dbg_no_line_info
;
func
.
module
=
sym
->
ModBase
;
...
...
@@ -575,13 +575,14 @@ enum dbg_line_status symbol_get_function_line_status(const ADDRESS64* addr)
* Returns sourcefile name and line number in a format that the listing
* handler can deal with.
*/
BOOL
symbol_get_line
(
const
char
*
filename
,
const
char
*
name
,
IMAGEHLP_LINE
*
line
)
BOOL
symbol_get_line
(
const
char
*
filename
,
const
char
*
name
,
IMAGEHLP_LINE64
*
line
)
{
struct
sgv_data
sgv
;
char
buffer
[
512
];
DWORD
opt
,
disp
;
unsigned
i
,
found
=
FALSE
;
IMAGEHLP_LINE
il
;
IMAGEHLP_LINE
64
il
;
sgv
.
num
=
0
;
sgv
.
num_thunks
=
0
;
...
...
@@ -619,7 +620,7 @@ BOOL symbol_get_line(const char* filename, const char* name, IMAGEHLP_LINE* line
DWORD_PTR
linear
=
(
DWORD_PTR
)
memory_to_linear_addr
(
&
sgv
.
syms
[
i
].
lvalue
.
addr
);
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
!
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
linear
,
&
disp
,
&
il
))
if
(
!
SymGetLineFromAddr
64
(
dbg_curr_process
->
handle
,
linear
,
&
disp
,
&
il
))
continue
;
if
(
filename
&&
strcmp
(
il
.
FileName
,
filename
))
continue
;
if
(
found
)
...
...
programs/winedbg/tgt_active.c
View file @
12c3a012
...
...
@@ -196,14 +196,14 @@ static unsigned dbg_exception_prolog(BOOL is_debug, BOOL first_chance, const EXC
SYMBOL_INFO
*
si
=
(
SYMBOL_INFO
*
)
buffer
;
void
*
lin
=
memory_to_linear_addr
(
&
addr
);
DWORD64
disp64
;
IMAGEHLP_LINE
il
;
IMAGEHLP_LINE
64
il
;
DWORD
disp
;
si
->
SizeOfStruct
=
sizeof
(
*
si
);
si
->
MaxNameLen
=
256
;
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
SymFromAddr
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
lin
,
&
disp64
,
si
)
&&
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
lin
,
&
disp
,
&
il
))
SymGetLineFromAddr
64
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
lin
,
&
disp
,
&
il
))
{
if
((
!
last_name
||
strcmp
(
last_name
,
si
->
Name
))
||
(
!
last_file
||
strcmp
(
last_file
,
il
.
FileName
)))
...
...
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