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
35d5c075
Commit
35d5c075
authored
Feb 28, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Support setting a breakpoint from a file name and line number.
parent
04e9b16c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
18 deletions
+21
-18
break.c
programs/winedbg/break.c
+12
-9
dbg.y
programs/winedbg/dbg.y
+6
-6
debug.l
programs/winedbg/debug.l
+2
-2
debugger.h
programs/winedbg/debugger.h
+1
-1
No files found.
programs/winedbg/break.c
View file @
35d5c075
...
...
@@ -292,7 +292,7 @@ static BOOL CALLBACK line_cb(SRCCODEINFO* sci, void* user)
*
* Add a breakpoint from a line number in current file
*/
void
break_add_break_from_lineno
(
int
lineno
,
BOOL
swbp
)
void
break_add_break_from_lineno
(
const
char
*
filename
,
int
lineno
,
BOOL
swbp
)
{
struct
cb_break_lineno
bkln
;
...
...
@@ -301,20 +301,23 @@ void break_add_break_from_lineno(int lineno, BOOL swbp)
if
(
lineno
!=
-
1
)
{
IMAGEHLP_LINE64
il
;
DWORD
disp
;
DWORD_PTR
linear
=
(
DWORD_PTR
)
memory_to_linear_addr
(
&
bkln
.
addr
);
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
!
SymGetLineFromAddr64
(
dbg_curr_process
->
handle
,
linear
,
&
disp
,
&
il
))
if
(
!
filename
)
{
dbg_printf
(
"Unable to add breakpoint (unknown address %lx)
\n
"
,
linear
);
return
;
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
,
il
.
FileN
ame
,
line_cb
,
&
bkln
);
SymEnumLines
(
dbg_curr_process
->
handle
,
linear
,
NULL
,
filen
ame
,
line_cb
,
&
bkln
);
if
(
!
bkln
.
addr
.
Offset
)
{
dbg_printf
(
"Unknown line number
\n
"
...
...
programs/winedbg/dbg.y
View file @
35d5c075
...
...
@@ -233,14 +233,14 @@ print_command:
break_command:
tBREAK '*' expr_lvalue { break_add_break_from_lvalue(&$3, TRUE); }
| tBREAK identifier { break_add_break_from_id($2, -1, TRUE); }
| tBREAK
identifier ':' tNUM { break_add_break_from_id
($2, $4, TRUE); }
| tBREAK tNUM
{ break_add_break_from_lineno(
$2, TRUE); }
| tBREAK { break_add_break_from_lineno(-1, TRUE); }
| tBREAK
pathname ':' tNUM { break_add_break_from_lineno
($2, $4, TRUE); }
| tBREAK tNUM
{ break_add_break_from_lineno(NULL,
$2, TRUE); }
| tBREAK { break_add_break_from_lineno(
NULL,
-1, TRUE); }
| tHBREAK '*' expr_lvalue { break_add_break_from_lvalue(&$3, FALSE); }
| tHBREAK identifier { break_add_break_from_id($2, -1, FALSE); }
| tHBREAK
identifier ':' tNUM { break_add_break_from_id
($2, $4, FALSE); }
| tHBREAK tNUM
{ break_add_break_from_lineno(
$2, FALSE); }
| tHBREAK { break_add_break_from_lineno(-1, FALSE); }
| tHBREAK
pathname ':' tNUM { break_add_break_from_lineno
($2, $4, FALSE); }
| tHBREAK tNUM
{ break_add_break_from_lineno(NULL,
$2, FALSE); }
| tHBREAK { break_add_break_from_lineno(
NULL,
-1, FALSE); }
| tENABLE tNUM { break_enable_xpoint($2, TRUE); }
| tENABLE tBREAK tNUM { break_enable_xpoint($3, TRUE); }
| tDISABLE tNUM { break_enable_xpoint($2, FALSE); }
...
...
programs/winedbg/debug.l
View file @
35d5c075
...
...
@@ -200,8 +200,8 @@ STRING \"[^\n"]+\"
<INITIAL,NOPROCESS>source|sourc|sour|src { BEGIN(PATH_EXPECTED); return tSOURCE; }
<INITIAL>symbolfile|symbols|symbol|sf { BEGIN(PATH_EXPECTED); return tSYMBOLFILE; }
<INITIAL,INFO_CMD,BD_CMD>break|brea|bre|br|b { BEGIN(
NOCM
D); return tBREAK; }
<INITIAL,INFO_CMD,BD_CMD>hbreak|hbrea|hbre|hbr|hb { BEGIN(
NOCM
D); return tHBREAK; }
<INITIAL,INFO_CMD,BD_CMD>break|brea|bre|br|b { BEGIN(
PATH_ACCEPTE
D); return tBREAK; }
<INITIAL,INFO_CMD,BD_CMD>hbreak|hbrea|hbre|hbr|hb { BEGIN(
PATH_ACCEPTE
D); return tHBREAK; }
<INITIAL>watch|watc|wat { BEGIN(NOCMD); return tWATCH; }
<INITIAL>rwatch|rwatc|rwat { BEGIN(NOCMD); return tRWATCH; }
<INITIAL>whatis|whati|what { BEGIN(NOCMD); return tWHATIS; }
...
...
programs/winedbg/debugger.h
View file @
35d5c075
...
...
@@ -293,7 +293,7 @@ extern void break_set_xpoints(BOOL set);
extern
BOOL
break_add_break
(
const
ADDRESS64
*
addr
,
BOOL
verbose
,
BOOL
swbp
);
extern
BOOL
break_add_break_from_lvalue
(
const
struct
dbg_lvalue
*
value
,
BOOL
swbp
);
extern
void
break_add_break_from_id
(
const
char
*
name
,
int
lineno
,
BOOL
swbp
);
extern
void
break_add_break_from_lineno
(
int
lineno
,
BOOL
swbp
);
extern
void
break_add_break_from_lineno
(
const
char
*
filename
,
int
lineno
,
BOOL
swbp
);
extern
void
break_add_watch_from_lvalue
(
const
struct
dbg_lvalue
*
lvalue
,
BOOL
is_write
);
extern
void
break_add_watch_from_id
(
const
char
*
name
,
BOOL
is_write
);
extern
void
break_check_delayed_bp
(
void
);
...
...
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