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
99e07b5b
Commit
99e07b5b
authored
Nov 08, 2004
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 08, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixed regression in watchpoint setting (by addr)
- in backtrace, show at least module when no symbol is found - protect event parsing from command line (when no real number)
parent
0bec4b70
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
28 deletions
+47
-28
break.c
programs/winedbg/break.c
+18
-2
dbg.y
programs/winedbg/dbg.y
+1
-1
debugger.h
programs/winedbg/debugger.h
+1
-1
memory.c
programs/winedbg/memory.c
+26
-23
winedbg.c
programs/winedbg/winedbg.c
+1
-1
No files found.
programs/winedbg/break.c
View file @
99e07b5b
...
@@ -351,7 +351,7 @@ void break_check_delayed_bp(void)
...
@@ -351,7 +351,7 @@ void break_check_delayed_bp(void)
*
*
* Add a watchpoint.
* Add a watchpoint.
*/
*/
void
break_add_watch
(
const
struct
dbg_lvalue
*
lvalue
,
BOOL
is_write
)
static
void
break_add_watch
(
const
struct
dbg_lvalue
*
lvalue
,
BOOL
is_write
)
{
{
int
num
;
int
num
;
DWORD
l
=
4
;
DWORD
l
=
4
;
...
@@ -387,10 +387,26 @@ void break_add_watch(const struct dbg_lvalue* lvalue, BOOL is_write)
...
@@ -387,10 +387,26 @@ void break_add_watch(const struct dbg_lvalue* lvalue, BOOL is_write)
dbg_printf
(
"
\n
"
);
dbg_printf
(
"
\n
"
);
}
}
/******************************************************************
* break_add_watch_from_lvalue
*
* Adds a watch point from an address (stored in a lvalue)
*/
void
break_add_watch_from_lvalue
(
const
struct
dbg_lvalue
*
lvalue
)
{
struct
dbg_lvalue
lval
;
lval
.
addr
.
Mode
=
AddrModeFlat
;
lval
.
addr
.
Offset
=
types_extract_as_integer
(
lvalue
);
lval
.
type
.
id
=
dbg_itype_none
;
break_add_watch
(
&
lval
,
TRUE
);
}
/***********************************************************************
/***********************************************************************
* break_add_watch_from_id
* break_add_watch_from_id
*
*
* Add a watchpoint from a symbol name
(and eventually a line #)
* Add a watchpoint from a symbol name
*/
*/
void
break_add_watch_from_id
(
const
char
*
name
)
void
break_add_watch_from_id
(
const
char
*
name
)
{
{
...
...
programs/winedbg/dbg.y
View file @
99e07b5b
...
@@ -226,7 +226,7 @@ break_command:
...
@@ -226,7 +226,7 @@ break_command:
;
;
watch_command:
watch_command:
tWATCH '*' expr_lvalue { break_add_watch
(&$3, 1
); }
tWATCH '*' expr_lvalue { break_add_watch
_from_lvalue(&$3
); }
| tWATCH identifier { break_add_watch_from_id($2); }
| tWATCH identifier { break_add_watch_from_id($2); }
;
;
...
...
programs/winedbg/debugger.h
View file @
99e07b5b
...
@@ -244,7 +244,7 @@ extern BOOL break_add_break(const ADDRESS* addr, BOOL verbose);
...
@@ -244,7 +244,7 @@ extern BOOL break_add_break(const ADDRESS* addr, BOOL verbose);
extern
BOOL
break_add_break_from_lvalue
(
const
struct
dbg_lvalue
*
value
);
extern
BOOL
break_add_break_from_lvalue
(
const
struct
dbg_lvalue
*
value
);
extern
void
break_add_break_from_id
(
const
char
*
name
,
int
lineno
);
extern
void
break_add_break_from_id
(
const
char
*
name
,
int
lineno
);
extern
void
break_add_break_from_lineno
(
int
lineno
);
extern
void
break_add_break_from_lineno
(
int
lineno
);
extern
void
break_add_watch
(
const
struct
dbg_lvalue
*
lvalue
,
int
is_writ
e
);
extern
void
break_add_watch
_from_lvalue
(
const
struct
dbg_lvalue
*
lvalu
e
);
extern
void
break_add_watch_from_id
(
const
char
*
name
);
extern
void
break_add_watch_from_id
(
const
char
*
name
);
extern
void
break_check_delayed_bp
(
void
);
extern
void
break_check_delayed_bp
(
void
);
extern
void
break_delete_xpoint
(
int
num
);
extern
void
break_delete_xpoint
(
int
num
);
...
...
programs/winedbg/memory.c
View file @
99e07b5b
...
@@ -542,40 +542,43 @@ void print_addr_and_args(const ADDRESS* pc, const ADDRESS* frame)
...
@@ -542,40 +542,43 @@ void print_addr_and_args(const ADDRESS* pc, const ADDRESS* frame)
IMAGEHLP_STACK_FRAME
isf
;
IMAGEHLP_STACK_FRAME
isf
;
IMAGEHLP_LINE
il
;
IMAGEHLP_LINE
il
;
IMAGEHLP_MODULE
im
;
IMAGEHLP_MODULE
im
;
struct
sym_enum
se
;
char
tmp
[
1024
];
DWORD64
disp
;
DWORD64
disp
;
if
(
pc
->
Mode
!=
AddrModeFlat
)
print_bare_address
(
pc
);
dbg_printf
(
"0x%04x:0x%04lx"
,
pc
->
Segment
,
pc
->
Offset
);
else
dbg_printf
(
"0x%08lx"
,
pc
->
Offset
);
isf
.
InstructionOffset
=
(
DWORD_PTR
)
memory_to_linear_addr
(
pc
);
isf
.
InstructionOffset
=
(
DWORD_PTR
)
memory_to_linear_addr
(
pc
);
isf
.
FrameOffset
=
(
DWORD_PTR
)
memory_to_linear_addr
(
frame
);
isf
.
FrameOffset
=
(
DWORD_PTR
)
memory_to_linear_addr
(
frame
);
/* grab module where symbol is. If we don't have a module, we cannot print more */
im
.
SizeOfStruct
=
sizeof
(
im
);
if
(
!
SymGetModuleInfo
(
dbg_curr_process
->
handle
,
isf
.
InstructionOffset
,
&
im
))
return
;
si
->
SizeOfStruct
=
sizeof
(
*
si
);
si
->
SizeOfStruct
=
sizeof
(
*
si
);
si
->
MaxNameLen
=
256
;
si
->
MaxNameLen
=
256
;
if
(
!
SymFromAddr
(
dbg_curr_process
->
handle
,
isf
.
InstructionOffset
,
&
disp
,
si
))
if
(
SymFromAddr
(
dbg_curr_process
->
handle
,
isf
.
InstructionOffset
,
&
disp
,
si
))
return
;
{
struct
sym_enum
se
;
char
tmp
[
1024
];
dbg_printf
(
" %s"
,
si
->
Name
);
dbg_printf
(
" %s"
,
si
->
Name
);
if
(
disp
)
dbg_printf
(
"+0x%lx"
,
(
DWORD_PTR
)
disp
);
if
(
disp
)
dbg_printf
(
"+0x%lx"
,
(
DWORD_PTR
)
disp
);
SymSetContext
(
dbg_curr_process
->
handle
,
&
isf
,
NULL
);
SymSetContext
(
dbg_curr_process
->
handle
,
&
isf
,
NULL
);
se
.
tmp
=
tmp
;
se
.
tmp
=
tmp
;
se
.
frame
=
isf
.
FrameOffset
;
se
.
frame
=
isf
.
FrameOffset
;
tmp
[
0
]
=
'\0'
;
tmp
[
0
]
=
'\0'
;
SymEnumSymbols
(
dbg_curr_process
->
handle
,
0
,
NULL
,
sym_enum_cb
,
&
se
);
SymEnumSymbols
(
dbg_curr_process
->
handle
,
0
,
NULL
,
sym_enum_cb
,
&
se
);
if
(
tmp
[
0
])
dbg_printf
(
"(%s)"
,
tmp
);
if
(
tmp
[
0
])
dbg_printf
(
"(%s)"
,
tmp
);
il
.
SizeOfStruct
=
sizeof
(
il
);
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
isf
.
InstructionOffset
,
if
(
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
isf
.
InstructionOffset
,
NULL
,
&
il
))
NULL
,
&
il
))
dbg_printf
(
" [%s:%lu]"
,
il
.
FileName
,
il
.
LineNumber
);
dbg_printf
(
" [%s:%lu]"
,
il
.
FileName
,
il
.
LineNumber
);
im
.
SizeOfStruct
=
sizeof
(
im
);
if
(
SymGetModuleInfo
(
dbg_curr_process
->
handle
,
isf
.
InstructionOffset
,
&
im
))
dbg_printf
(
" in %s"
,
im
.
ModuleName
);
dbg_printf
(
" in %s"
,
im
.
ModuleName
);
}
else
dbg_printf
(
" in %s (+0x%lx)"
,
im
.
ModuleName
,
(
DWORD_PTR
)(
isf
.
InstructionOffset
-
im
.
BaseOfImage
));
}
}
BOOL
memory_disasm_one_insn
(
ADDRESS
*
addr
)
BOOL
memory_disasm_one_insn
(
ADDRESS
*
addr
)
...
...
programs/winedbg/winedbg.c
View file @
99e07b5b
...
@@ -1180,7 +1180,7 @@ int main(int argc, char** argv)
...
@@ -1180,7 +1180,7 @@ int main(int argc, char** argv)
char
*
ptr
;
char
*
ptr
;
dbg_curr_pid
=
strtol
(
argv
[
1
],
&
ptr
,
10
);
dbg_curr_pid
=
strtol
(
argv
[
1
],
&
ptr
,
10
);
if
(
dbg_curr_pid
==
0
||
ptr
==
NULL
||
if
(
dbg_curr_pid
==
0
||
ptr
!=
argv
[
1
]
+
strlen
(
argv
[
1
])
||
!
dbg_attach_debuggee
(
dbg_curr_pid
,
dbg_action_mode
!=
gdb_mode
,
FALSE
))
!
dbg_attach_debuggee
(
dbg_curr_pid
,
dbg_action_mode
!=
gdb_mode
,
FALSE
))
dbg_curr_pid
=
0
;
dbg_curr_pid
=
0
;
}
}
...
...
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