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
b9aa7c9a
Commit
b9aa7c9a
authored
Nov 14, 1998
by
Ulrich Weigand
Committed by
Alexandre Julliard
Nov 14, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: -debug didn't work anymore after the last startup sequence patch.
parent
999b1b70
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
29 deletions
+12
-29
break.c
debugger/break.c
+10
-28
debugger.h
include/debugger.h
+1
-1
task.h
include/task.h
+1
-0
No files found.
debugger/break.c
View file @
b9aa7c9a
...
...
@@ -332,27 +332,25 @@ void DEBUG_InfoBreakpoints(void)
/***********************************************************************
* DEBUG_Add
ModuleBreakpoints
* DEBUG_Add
TaskEntryBreakpoint
*
* Add a breakpoint at the
start of every loaded module.
* Add a breakpoint at the
entry point of the given task
*/
void
DEBUG_Add
ModuleBreakpoints
(
void
)
void
DEBUG_Add
TaskEntryBreakpoint
(
HTASK16
hTask
)
{
MODULEENTRY
entry
;
TDB
*
pTask
=
(
TDB
*
)
GlobalLock16
(
hTask
)
;
NE_MODULE
*
pModule
;
BOOL32
ok
;
DBG_ADDR
addr
=
{
NULL
,
0
,
0
};
WINE_MODREF
*
wm
;
for
(
ok
=
ModuleFirst
(
&
entry
);
ok
;
ok
=
ModuleNext
(
&
entry
)
)
if
(
pTask
)
{
if
(
!
(
pModule
=
NE_GetPtr
(
entry
.
hModule
)))
continue
;
if
(
pModule
->
flags
&
NE_FFLAGS_LIBMODULE
)
continue
;
/* Library */
if
(
!
(
pModule
=
NE_GetPtr
(
pTask
->
hModule
)))
return
;
if
(
pModule
->
flags
&
NE_FFLAGS_LIBMODULE
)
return
;
/* Library */
if
(
pModule
->
lpDosTask
)
{
/* DOS module */
addr
.
seg
=
pModule
->
lpDosTask
->
init_cs
|
((
DWORD
)
pModule
->
self
<<
16
);
addr
.
off
=
pModule
->
lpDosTask
->
init_ip
;
fprintf
(
stderr
,
"DOS task '%s': "
,
entry
.
szModule
);
fprintf
(
stderr
,
"DOS task '%s': "
,
NE_MODULE_NAME
(
pModule
)
);
DEBUG_AddBreakpoint
(
&
addr
);
}
else
if
(
!
(
pModule
->
flags
&
NE_FFLAGS_WIN32
))
/* NE module */
...
...
@@ -360,31 +358,15 @@ void DEBUG_AddModuleBreakpoints(void)
addr
.
seg
=
GlobalHandleToSel
(
NE_SEG_TABLE
(
pModule
)[
pModule
->
cs
-
1
].
hSeg
);
addr
.
off
=
pModule
->
ip
;
fprintf
(
stderr
,
"Win16 task '%s': "
,
entry
.
szModule
);
fprintf
(
stderr
,
"Win16 task '%s': "
,
NE_MODULE_NAME
(
pModule
)
);
DEBUG_AddBreakpoint
(
&
addr
);
}
else
/* PE module */
{
if
(
!
(
wm
=
PROCESS_Current
()
->
modref_list
))
{
addr
.
seg
=
0
;
addr
.
off
=
(
DWORD
)
RVA_PTR
(
pModule
->
module32
,
OptionalHeader
.
AddressOfEntryPoint
);
}
else
{
while
(
wm
)
{
if
(
wm
->
module
==
pModule
->
module32
)
break
;
wm
=
wm
->
next
;
}
if
(
!
wm
)
continue
;
addr
.
seg
=
0
;
addr
.
off
=
(
DWORD
)
RVA_PTR
(
wm
->
module
,
OptionalHeader
.
AddressOfEntryPoint
);
}
fprintf
(
stderr
,
"Win32 task '%s': "
,
entry
.
szModule
);
fprintf
(
stderr
,
"Win32 task '%s': "
,
NE_MODULE_NAME
(
pModule
)
);
DEBUG_AddBreakpoint
(
&
addr
);
}
}
...
...
include/debugger.h
View file @
b9aa7c9a
...
...
@@ -152,7 +152,7 @@ extern void DEBUG_AddBreakpoint( const DBG_ADDR *addr );
extern
void
DEBUG_DelBreakpoint
(
int
num
);
extern
void
DEBUG_EnableBreakpoint
(
int
num
,
BOOL32
enable
);
extern
void
DEBUG_InfoBreakpoints
(
void
);
extern
void
DEBUG_Add
ModuleBreakpoints
(
void
);
extern
void
DEBUG_Add
TaskEntryBreakpoint
(
HTASK16
hTask
);
extern
BOOL32
DEBUG_HandleTrap
(
void
);
extern
BOOL32
DEBUG_ShouldContinue
(
enum
exec_mode
mode
,
int
*
count
);
extern
enum
exec_mode
DEBUG_RestartExecution
(
enum
exec_mode
mode
,
int
count
);
...
...
include/task.h
View file @
b9aa7c9a
...
...
@@ -144,6 +144,7 @@ typedef struct _THHOOK
#pragma pack(4)
extern
THHOOK
*
pThhook
;
extern
void
(
*
TASK_AddTaskEntryBreakpoint
)(
HTASK16
hTask
);
extern
HTASK16
TASK_Create
(
struct
_THDB
*
thdb
,
struct
_NE_MODULE
*
pModule
,
HINSTANCE16
hInstance
,
HINSTANCE16
hPrevInstance
,
...
...
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