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
cf7120b8
Commit
cf7120b8
authored
Mar 07, 2011
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Fix 'break file : lineno' command so that file can be in other modules…
winedbg: Fix 'break file : lineno' command so that file can be in other modules than the current one.
parent
2d570921
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
24 deletions
+36
-24
break.c
programs/winedbg/break.c
+36
-24
No files found.
programs/winedbg/break.c
View file @
cf7120b8
...
...
@@ -270,6 +270,7 @@ void break_add_break_from_id(const char *name, int lineno, BOOL swbp)
struct
cb_break_lineno
{
const
char
*
filename
;
int
lineno
;
ADDRESS64
addr
;
};
...
...
@@ -287,6 +288,17 @@ static BOOL CALLBACK line_cb(SRCCODEINFO* sci, void* user)
return
TRUE
;
}
static
BOOL
CALLBACK
mcb
(
PCWSTR
module
,
DWORD64
base
,
void
*
user
)
{
struct
cb_break_lineno
*
bkln
=
user
;
SymEnumLines
(
dbg_curr_process
->
handle
,
base
,
NULL
,
bkln
->
filename
,
line_cb
,
bkln
);
/* continue module enum if no addr found
* FIXME: we don't report when several addresses match the same filename/lineno pair
*/
return
!
bkln
->
addr
.
Offset
;
}
/***********************************************************************
* break_add_break_from_lineno
*
...
...
@@ -295,38 +307,38 @@ static BOOL CALLBACK line_cb(SRCCODEINFO* sci, void* user)
void
break_add_break_from_lineno
(
const
char
*
filename
,
int
lineno
,
BOOL
swbp
)
{
struct
cb_break_lineno
bkln
;
bkln
.
addr
.
Offset
=
0
;
bkln
.
lineno
=
lineno
;
memory_get_current_pc
(
&
bkln
.
addr
);
if
(
lineno
!=
-
1
)
if
(
!
filename
)
{
DWORD
disp
;
ADDRESS64
curr
;
IMAGEHLP_LINE64
il
;
DWORD_PTR
linear
=
(
DWORD_PTR
)
memory_to_linear_addr
(
&
bkln
.
addr
)
;
DWORD_PTR
linear
;
if
(
!
filename
)
memory_get_current_pc
(
&
curr
);
linear
=
(
DWORD_PTR
)
memory_to_linear_addr
(
&
curr
);
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
!
SymGetLineFromAddr64
(
dbg_curr_process
->
handle
,
linear
,
&
disp
,
&
il
))
{
DWORD
disp
;
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
!
SymGetLineFromAddr64
(
dbg_curr_process
->
handle
,
linear
,
&
disp
,
&
il
))
{
dbg_printf
(
"Unable to add breakpoint (unknown address %lx)
\n
"
,
linear
);
return
;
}
filename
=
il
.
FileName
;
}
bkln
.
addr
.
Offset
=
0
;
bkln
.
lineno
=
lineno
;
SymEnumLines
(
dbg_curr_process
->
handle
,
linear
,
NULL
,
filename
,
line_cb
,
&
bkln
);
if
(
!
bkln
.
addr
.
Offset
)
{
dbg_printf
(
"Unknown line number
\n
"
"(either out of file, or no code at given line number)
\n
"
);
dbg_printf
(
"Unable to add breakpoint (unknown address %lx)
\n
"
,
linear
);
return
;
}
filename
=
il
.
FileName
;
SymEnumLines
(
dbg_curr_process
->
handle
,
linear
,
NULL
,
filename
,
line_cb
,
&
bkln
);
}
break_add_break
(
&
bkln
.
addr
,
TRUE
,
swbp
);
else
{
/* we have to enumerate across modules */
bkln
.
filename
=
filename
;
SymEnumerateModulesW64
(
dbg_curr_process
->
handle
,
mcb
,
&
bkln
);
}
if
(
bkln
.
addr
.
Offset
)
break_add_break
(
&
bkln
.
addr
,
TRUE
,
swbp
);
else
dbg_printf
(
"Unknown line number
\n
"
"(either out of file, or no code at given line number)
\n
"
);
}
/***********************************************************************
...
...
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