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
2dba29a6
Commit
2dba29a6
authored
Feb 23, 2022
by
Brendan Shanks
Committed by
Alexandre Julliard
Jul 27, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Prefer thread name from GetThreadDescription() in GDB proxy mode.
parent
f89c8be8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
gdbproxy.c
programs/winedbg/gdbproxy.c
+19
-1
No files found.
programs/winedbg/gdbproxy.c
View file @
2dba29a6
...
...
@@ -269,6 +269,18 @@ static inline void reply_buffer_append_str(struct reply_buffer* reply, const cha
reply_buffer_append
(
reply
,
str
,
strlen
(
str
));
}
static
inline
void
reply_buffer_append_wstr
(
struct
reply_buffer
*
reply
,
const
WCHAR
*
wstr
)
{
char
*
str
;
int
len
;
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
wstr
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
str
=
malloc
(
len
);
if
(
str
&&
WideCharToMultiByte
(
CP_ACP
,
0
,
wstr
,
-
1
,
str
,
len
,
NULL
,
NULL
))
reply_buffer_append_str
(
reply
,
str
);
free
(
str
);
}
static
inline
void
reply_buffer_append_hex
(
struct
reply_buffer
*
reply
,
const
void
*
src
,
size_t
len
)
{
reply_buffer_grow
(
reply
,
len
*
2
);
...
...
@@ -1777,6 +1789,7 @@ static enum packet_return packet_query_threads(struct gdb_context* gdbctx)
struct
reply_buffer
*
reply
=
&
gdbctx
->
qxfer_buffer
;
struct
dbg_process
*
process
=
gdbctx
->
process
;
struct
dbg_thread
*
thread
;
WCHAR
*
description
;
if
(
!
process
)
return
packet_error
;
...
...
@@ -1790,7 +1803,12 @@ static enum packet_return packet_query_threads(struct gdb_context* gdbctx)
reply_buffer_append_str
(
reply
,
"id=
\"
"
);
reply_buffer_append_uinthex
(
reply
,
thread
->
tid
,
4
);
reply_buffer_append_str
(
reply
,
"
\"
name=
\"
"
);
if
(
strlen
(
thread
->
name
))
if
((
description
=
fetch_thread_description
(
thread
->
tid
)))
{
reply_buffer_append_wstr
(
reply
,
description
);
LocalFree
(
description
);
}
else
if
(
strlen
(
thread
->
name
))
{
reply_buffer_append_str
(
reply
,
thread
->
name
);
}
...
...
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