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
9fa62458
Commit
9fa62458
authored
Mar 18, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Get rid of dbg_W2A helper.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fd886c72
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
34 deletions
+10
-34
debugger.h
programs/winedbg/debugger.h
+0
-1
gdbproxy.c
programs/winedbg/gdbproxy.c
+4
-4
stack.c
programs/winedbg/stack.c
+2
-3
tgt_active.c
programs/winedbg/tgt_active.c
+2
-2
tgt_minidump.c
programs/winedbg/tgt_minidump.c
+2
-2
winedbg.c
programs/winedbg/winedbg.c
+0
-22
No files found.
programs/winedbg/debugger.h
View file @
9fa62458
...
...
@@ -501,7 +501,6 @@ extern BOOL types_is_integral_type(const struct dbg_lvalue*);
extern
BOOL
types_is_float_type
(
const
struct
dbg_lvalue
*
);
/* winedbg.c */
extern
const
char
*
dbg_W2A
(
const
WCHAR
*
buffer
,
unsigned
len
);
#ifdef __GNUC__
extern
int
WINAPIV
dbg_printf
(
const
char
*
format
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
#else
...
...
programs/winedbg/gdbproxy.c
View file @
9fa62458
...
...
@@ -538,9 +538,9 @@ static BOOL handle_debug_event(struct gdb_context* gdbctx, BOOL stop_on_dll_load
QueryFullProcessImageNameW
(
gdbctx
->
process
->
handle
,
0
,
u
.
buffer
,
&
size
);
dbg_set_process_name
(
gdbctx
->
process
,
u
.
buffer
);
fprintf
(
stderr
,
"%04lx:%04lx: create process '%s'/%p @%p (%lu<%lu>)
\n
"
,
fprintf
(
stderr
,
"%04lx:%04lx: create process '%
l
s'/%p @%p (%lu<%lu>)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
dbg_W2A
(
u
.
buffer
,
-
1
)
,
u
.
buffer
,
de
->
u
.
CreateProcessInfo
.
lpImageName
,
de
->
u
.
CreateProcessInfo
.
lpStartAddress
,
de
->
u
.
CreateProcessInfo
.
dwDebugInfoFileOffset
,
...
...
@@ -564,9 +564,9 @@ static BOOL handle_debug_event(struct gdb_context* gdbctx, BOOL stop_on_dll_load
case
LOAD_DLL_DEBUG_EVENT
:
fetch_module_name
(
de
->
u
.
LoadDll
.
lpImageName
,
de
->
u
.
LoadDll
.
lpBaseOfDll
,
u
.
buffer
,
ARRAY_SIZE
(
u
.
buffer
)
);
fprintf
(
stderr
,
"%04lx:%04lx: loads DLL %s @%p (%lu<%lu>)
\n
"
,
fprintf
(
stderr
,
"%04lx:%04lx: loads DLL %
l
s @%p (%lu<%lu>)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
dbg_W2A
(
u
.
buffer
,
-
1
)
,
u
.
buffer
,
de
->
u
.
LoadDll
.
lpBaseOfDll
,
de
->
u
.
LoadDll
.
dwDebugInfoFileOffset
,
de
->
u
.
LoadDll
.
nDebugInfoSize
);
...
...
programs/winedbg/stack.c
View file @
9fa62458
...
...
@@ -407,9 +407,8 @@ static void backtrace_all(void)
dbg_active_wait_for_first_exception
();
}
dbg_printf
(
"
\n
Backtracing for thread %04lx in process %04lx (%s):
\n
"
,
entry
.
th32ThreadID
,
dbg_curr_pid
,
dbg_W2A
(
dbg_curr_process
->
imageName
,
-
1
));
dbg_printf
(
"
\n
Backtracing for thread %04lx in process %04lx (%ls):
\n
"
,
entry
.
th32ThreadID
,
dbg_curr_pid
,
dbg_curr_process
->
imageName
);
backtrace_tid
(
dbg_curr_process
,
entry
.
th32ThreadID
);
}
while
(
Thread32Next
(
snapshot
,
&
entry
));
...
...
programs/winedbg/tgt_active.c
View file @
9fa62458
...
...
@@ -484,8 +484,8 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
break_set_xpoints
(
TRUE
);
if
(
DBG_IVAR
(
BreakOnDllLoad
))
{
dbg_printf
(
"Stopping on DLL %s loading at %p
\n
"
,
dbg_W2A
(
u
.
buffer
,
-
1
)
,
de
->
u
.
LoadDll
.
lpBaseOfDll
);
dbg_printf
(
"Stopping on DLL %
l
s loading at %p
\n
"
,
u
.
buffer
,
de
->
u
.
LoadDll
.
lpBaseOfDll
);
if
(
dbg_fetch_context
())
cont
=
0
;
}
break
;
...
...
programs/winedbg/tgt_minidump.c
View file @
9fa62458
...
...
@@ -307,8 +307,8 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
str
=
"???"
;
break
;
}
dbg_printf
(
" %s was running on #%d %s CPU%s"
,
dbg_W2A
(
exec_name
,
-
1
)
,
msi
->
u
.
s
.
NumberOfProcessors
,
str
,
dbg_printf
(
" %
l
s was running on #%d %s CPU%s"
,
exec_name
,
msi
->
u
.
s
.
NumberOfProcessors
,
str
,
msi
->
u
.
s
.
NumberOfProcessors
<
2
?
""
:
"s"
);
switch
(
msi
->
MajorVersion
)
{
...
...
programs/winedbg/winedbg.c
View file @
9fa62458
...
...
@@ -113,28 +113,6 @@ static void dbg_outputA(const char* buffer, int len)
}
}
const
char
*
dbg_W2A
(
const
WCHAR
*
buffer
,
unsigned
len
)
{
static
unsigned
ansilen
;
static
char
*
ansi
;
unsigned
newlen
;
newlen
=
WideCharToMultiByte
(
CP_ACP
,
0
,
buffer
,
len
,
NULL
,
0
,
NULL
,
NULL
);
if
(
newlen
>
ansilen
)
{
static
char
*
newansi
;
if
(
ansi
)
newansi
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
ansi
,
newlen
);
else
newansi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
newlen
);
if
(
!
newansi
)
return
NULL
;
ansilen
=
newlen
;
ansi
=
newansi
;
}
WideCharToMultiByte
(
CP_ACP
,
0
,
buffer
,
len
,
ansi
,
newlen
,
NULL
,
NULL
);
return
ansi
;
}
int
WINAPIV
dbg_printf
(
const
char
*
format
,
...)
{
static
char
buf
[
4
*
1024
];
...
...
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