Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
2bee5ab0
Commit
2bee5ab0
authored
19 years ago
by
Eric Pouech
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
taskmgr: Fix viewing of debug channels.
Various internal cleanups.
parent
17d93f98
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
programs/taskmgr/dbgchnl.c
+5
-26
5 additions, 26 deletions
programs/taskmgr/dbgchnl.c
with
5 additions
and
26 deletions
programs/taskmgr/dbgchnl.c
+
5
−
26
View file @
2bee5ab0
...
...
@@ -180,14 +180,6 @@ static void* get_symbol(HANDLE hProcess, char* name, char* lib)
return
ret
;
}
struct
dll_option_layout
{
void
*
next
;
void
*
prev
;
char
*
const
*
channels
;
int
nb_channels
;
};
typedef
int
(
*
EnumChannelCB
)(
HANDLE
,
void
*
,
struct
__wine_debug_channel
*
,
void
*
);
/******************************************************************
...
...
@@ -196,21 +188,13 @@ typedef int (*EnumChannelCB)(HANDLE, void*, struct __wine_debug_channel*, void*)
* Enumerates all known channels on process hProcess through callback
* ce.
*/
static
int
enum_channel
(
HANDLE
hProcess
,
EnumChannelCB
ce
,
void
*
user
,
unsigned
unique
)
static
int
enum_channel
(
HANDLE
hProcess
,
EnumChannelCB
ce
,
void
*
user
)
{
struct
__wine_debug_channel
channel
;
int
ret
=
1
;
unsigned
int
j
;
void
*
addr
;
const
char
**
cache
=
NULL
;
unsigned
num_cache
,
used_cache
;
if
(
!
(
addr
=
get_symbol
(
hProcess
,
"debug_options"
,
"libwine.so"
)))
return
-
1
;
if
(
unique
)
cache
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
num_cache
=
32
)
*
sizeof
(
char
*
));
else
num_cache
=
0
;
used_cache
=
0
;
while
(
ret
&&
addr
&&
ReadProcessMemory
(
hProcess
,
addr
,
&
channel
,
sizeof
(
channel
),
NULL
))
{
...
...
@@ -218,11 +202,6 @@ static int enum_channel(HANDLE hProcess, EnumChannelCB ce, void* user, unsigned
ret
=
ce
(
hProcess
,
addr
,
&
channel
,
user
);
addr
=
(
struct
__wine_debug_channel
*
)
addr
+
1
;
}
if
(
unique
)
{
for
(
j
=
0
;
j
<
used_cache
;
j
++
)
HeapFree
(
GetProcessHeap
(),
0
,
(
char
*
)
cache
[
j
]);
HeapFree
(
GetProcessHeap
(),
0
,
cache
);
}
return
0
;
}
...
...
@@ -232,10 +211,10 @@ static void DebugChannels_FillList(HWND hChannelLV)
ListView_DeleteAllItems
(
hChannelLV
);
hProcess
=
OpenProcess
(
PROCESS_VM_OPERATION
|
PROCESS_VM_READ
,
FALSE
,
get_selected_pid
());
hProcess
=
OpenProcess
(
PROCESS_QUERY_INFORMATION
|
PROCESS_VM_OPERATION
|
PROCESS_VM_READ
,
FALSE
,
get_selected_pid
());
if
(
!
hProcess
)
return
;
/* FIXME messagebox */
SendMessage
(
hChannelLV
,
WM_SETREDRAW
,
FALSE
,
0
);
enum_channel
(
hProcess
,
list_channel_CB
,
(
void
*
)
hChannelLV
,
TRUE
);
enum_channel
(
hProcess
,
list_channel_CB
,
(
void
*
)
hChannelLV
);
SendMessage
(
hChannelLV
,
WM_SETREDRAW
,
TRUE
,
0
);
CloseHandle
(
hProcess
);
}
...
...
@@ -310,14 +289,14 @@ static void DebugChannels_OnNotify(HWND hDlg, LPARAM lParam)
user
.
value
=
(
val
[
0
]
==
'x'
)
?
0
:
bitmask
;
user
.
mask
=
bitmask
;
user
.
done
=
user
.
notdone
=
0
;
enum_channel
(
hProcess
,
change_channel_CB
,
&
user
,
FALSE
);
enum_channel
(
hProcess
,
change_channel_CB
,
&
user
);
if
(
user
.
done
)
{
val
[
0
]
^=
(
'x'
^
' '
);
ListView_SetItemText
(
hChannelLV
,
lhti
.
iItem
,
lhti
.
iSubItem
,
val
);
}
if
(
user
.
notdone
)
printf
(
"Some channel instance weren't correctly set
\n
"
);
printf
(
"Some channel instance
s
weren't correctly set
\n
"
);
}
CloseHandle
(
hProcess
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment