Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b0319099
Commit
b0319099
authored
Feb 07, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c4b0c89b
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
101 additions
and
102 deletions
+101
-102
Makefile.in
programs/winedbg/Makefile.in
+0
-1
be_i386.c
programs/winedbg/be_i386.c
+6
-6
be_x86_64.c
programs/winedbg/be_x86_64.c
+3
-3
dbg.y
programs/winedbg/dbg.y
+1
-1
gdbproxy.c
programs/winedbg/gdbproxy.c
+26
-26
info.c
programs/winedbg/info.c
+13
-13
memory.c
programs/winedbg/memory.c
+5
-5
stack.c
programs/winedbg/stack.c
+6
-6
symbol.c
programs/winedbg/symbol.c
+1
-1
tgt_active.c
programs/winedbg/tgt_active.c
+22
-22
tgt_minidump.c
programs/winedbg/tgt_minidump.c
+2
-2
types.c
programs/winedbg/types.c
+11
-11
winedbg.c
programs/winedbg/winedbg.c
+5
-5
No files found.
programs/winedbg/Makefile.in
View file @
b0319099
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
winedbg.exe
IMPORTS
=
dbghelp advapi32
DELAYIMPORTS
=
comdlg32 shell32 comctl32 user32 gdi32 ws2_32
...
...
programs/winedbg/be_i386.c
View file @
b0319099
...
...
@@ -143,7 +143,7 @@ static void be_i386_all_print_context(HANDLE hThread, const dbg_ctx_t *pctx)
dbg_printf
(
" FLSW:%04x"
,
LOWORD
(
ctx
->
FloatSave
.
StatusWord
));
/* Isolate the condition code bits - note they are not contiguous */
dbg_printf
(
"(CC:%
d%d%d%
d"
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00004000
)
>>
14
,
dbg_printf
(
"(CC:%
ld%ld%ld%l
d"
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00004000
)
>>
14
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00000400
)
>>
10
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00000200
)
>>
9
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00000100
)
>>
8
);
...
...
@@ -176,7 +176,7 @@ static void be_i386_all_print_context(HANDLE hThread, const dbg_ctx_t *pctx)
dbg_printf
(
")
\n
"
);
/* Here are the rest of the registers */
dbg_printf
(
" FLES:%08
x FLDO:%08x FLDS:%08x FLCNS:%08
x
\n
"
,
dbg_printf
(
" FLES:%08
lx FLDO:%08lx FLDS:%08lx FLCNS:%08l
x
\n
"
,
ctx
->
FloatSave
.
ErrorSelector
,
ctx
->
FloatSave
.
DataOffset
,
ctx
->
FloatSave
.
DataSelector
,
...
...
@@ -194,7 +194,7 @@ static void be_i386_all_print_context(HANDLE hThread, const dbg_ctx_t *pctx)
xmm_area
=
(
XSAVE_FORMAT
*
)
&
ctx
->
ExtendedRegisters
;
dbg_printf
(
" mxcsr: %04x ("
,
xmm_area
->
MxCsr
);
dbg_printf
(
" mxcsr: %04
l
x ("
,
xmm_area
->
MxCsr
);
for
(
cnt
=
0
;
cnt
<
16
;
cnt
++
)
if
(
xmm_area
->
MxCsr
&
(
1
<<
cnt
))
dbg_printf
(
" %s"
,
mxcsr_flags
[
cnt
]
);
dbg_printf
(
" )
\n
"
);
...
...
@@ -251,11 +251,11 @@ static void be_i386_print_context(HANDLE hThread, const dbg_ctx_t *pctx, int all
break
;
case
AddrModeFlat
:
case
AddrMode1632
:
dbg_printf
(
"
\n
EIP:%08
x ESP:%08x EBP:%08x EFLAGS:%08
x(%s)
\n
"
,
dbg_printf
(
"
\n
EIP:%08
lx ESP:%08lx EBP:%08lx EFLAGS:%08l
x(%s)
\n
"
,
ctx
->
Eip
,
ctx
->
Esp
,
ctx
->
Ebp
,
ctx
->
EFlags
,
buf
);
dbg_printf
(
" EAX:%08
x EBX:%08x ECX:%08x EDX:%08
x
\n
"
,
dbg_printf
(
" EAX:%08
lx EBX:%08lx ECX:%08lx EDX:%08l
x
\n
"
,
ctx
->
Eax
,
ctx
->
Ebx
,
ctx
->
Ecx
,
ctx
->
Edx
);
dbg_printf
(
" ESI:%08
x EDI:%08
x
\n
"
,
dbg_printf
(
" ESI:%08
lx EDI:%08l
x
\n
"
,
ctx
->
Esi
,
ctx
->
Edi
);
break
;
}
...
...
programs/winedbg/be_x86_64.c
View file @
b0319099
...
...
@@ -89,7 +89,7 @@ static void be_x86_64_print_context(HANDLE hThread, const dbg_ctx_t *pctx,
buf
[
i
]
=
' '
;
dbg_printf
(
"Register dump:
\n
"
);
dbg_printf
(
" rip:%016I64x rsp:%016I64x rbp:%016I64x eflags:%08x (%s)
\n
"
,
dbg_printf
(
" rip:%016I64x rsp:%016I64x rbp:%016I64x eflags:%08
l
x (%s)
\n
"
,
ctx
->
Rip
,
ctx
->
Rsp
,
ctx
->
Rbp
,
ctx
->
EFlags
,
buf
);
dbg_printf
(
" rax:%016I64x rbx:%016I64x rcx:%016I64x rdx:%016I64x
\n
"
,
ctx
->
Rax
,
ctx
->
Rbx
,
ctx
->
Rcx
,
ctx
->
Rdx
);
...
...
@@ -142,7 +142,7 @@ static void be_x86_64_print_context(HANDLE hThread, const dbg_ctx_t *pctx,
if
(
ctx
->
u
.
FltSave
.
StatusWord
&
0x00000080
)
dbg_printf
(
" #ES"
);
/* Error Summary */
if
(
ctx
->
u
.
FltSave
.
StatusWord
&
0x00008000
)
dbg_printf
(
" #FB"
);
/* FPU Busy */
dbg_printf
(
")
\n
"
);
dbg_printf
(
" flerr:%04x:%08
x fldata:%04x:%08
x
\n
"
,
dbg_printf
(
" flerr:%04x:%08
lx fldata:%04x:%08l
x
\n
"
,
ctx
->
u
.
FltSave
.
ErrorSelector
,
ctx
->
u
.
FltSave
.
ErrorOffset
,
ctx
->
u
.
FltSave
.
DataSelector
,
ctx
->
u
.
FltSave
.
DataOffset
);
...
...
@@ -154,7 +154,7 @@ static void be_x86_64_print_context(HANDLE hThread, const dbg_ctx_t *pctx,
}
dbg_printf
(
"
\n
"
);
dbg_printf
(
" mxcsr: %04x ("
,
ctx
->
u
.
FltSave
.
MxCsr
);
dbg_printf
(
" mxcsr: %04
l
x ("
,
ctx
->
u
.
FltSave
.
MxCsr
);
for
(
i
=
0
;
i
<
16
;
i
++
)
if
(
ctx
->
u
.
FltSave
.
MxCsr
&
(
1
<<
i
))
dbg_printf
(
" %s"
,
mxcsr_flags
[
i
]
);
dbg_printf
(
" )
\n
"
);
...
...
programs/winedbg/dbg.y
View file @
b0319099
...
...
@@ -445,7 +445,7 @@ static LONG WINAPI wine_dbg_cmd(EXCEPTION_POINTERS *eptr)
dbg_interrupt_debuggee();
return EXCEPTION_CONTINUE_EXECUTION;
default:
dbg_printf("\nException %x\n", eptr->ExceptionRecord->ExceptionCode);
dbg_printf("\nException %
l
x\n", eptr->ExceptionRecord->ExceptionCode);
break;
}
...
...
programs/winedbg/gdbproxy.c
View file @
b0319099
...
...
@@ -126,7 +126,7 @@ static void gdbctx_delete_xpoint(struct gdb_context *gdbctx, struct dbg_thread *
struct
backend_cpu
*
cpu
=
process
->
be_cpu
;
if
(
!
cpu
->
remove_Xpoint
(
process
->
handle
,
process
->
process_io
,
ctx
,
x
->
type
,
x
->
addr
,
x
->
value
,
x
->
size
))
ERR
(
"%04
x:%04
x: Couldn't remove breakpoint at:%p/%x type:%d
\n
"
,
process
->
pid
,
thread
?
thread
->
tid
:
~
0
,
x
->
addr
,
x
->
size
,
x
->
type
);
ERR
(
"%04
lx:%04l
x: Couldn't remove breakpoint at:%p/%x type:%d
\n
"
,
process
->
pid
,
thread
?
thread
->
tid
:
~
0
,
x
->
addr
,
x
->
size
,
x
->
type
);
list_remove
(
&
x
->
entry
);
HeapFree
(
GetProcessHeap
(),
0
,
x
);
...
...
@@ -142,13 +142,13 @@ static void gdbctx_insert_xpoint(struct gdb_context *gdbctx, struct dbg_thread *
if
(
!
cpu
->
insert_Xpoint
(
process
->
handle
,
process
->
process_io
,
ctx
,
type
,
addr
,
&
value
,
size
))
{
ERR
(
"%04
x:%04
x: Couldn't insert breakpoint at:%p/%x type:%d
\n
"
,
process
->
pid
,
thread
->
tid
,
addr
,
size
,
type
);
ERR
(
"%04
lx:%04l
x: Couldn't insert breakpoint at:%p/%x type:%d
\n
"
,
process
->
pid
,
thread
->
tid
,
addr
,
size
,
type
);
return
;
}
if
(
!
(
x
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
struct
gdb_xpoint
))))
{
ERR
(
"%04
x:%04
x: Couldn't allocate memory for breakpoint at:%p/%x type:%d
\n
"
,
process
->
pid
,
thread
->
tid
,
addr
,
size
,
type
);
ERR
(
"%04
lx:%04l
x: Couldn't allocate memory for breakpoint at:%p/%x type:%d
\n
"
,
process
->
pid
,
thread
->
tid
,
addr
,
size
,
type
);
return
;
}
...
...
@@ -415,12 +415,12 @@ static void dbg_thread_set_single_step(struct dbg_thread *thread, BOOL enable)
if
(
!
backend
->
get_context
(
thread
->
handle
,
&
ctx
))
{
ERR
(
"get_context failed for thread %04
x:%04
x
\n
"
,
thread
->
process
->
pid
,
thread
->
tid
);
ERR
(
"get_context failed for thread %04
lx:%04l
x
\n
"
,
thread
->
process
->
pid
,
thread
->
tid
);
return
;
}
backend
->
single_step
(
&
ctx
,
enable
);
if
(
!
backend
->
set_context
(
thread
->
handle
,
&
ctx
))
ERR
(
"set_context failed for thread %04
x:%04
x
\n
"
,
thread
->
process
->
pid
,
thread
->
tid
);
ERR
(
"set_context failed for thread %04
lx:%04l
x
\n
"
,
thread
->
process
->
pid
,
thread
->
tid
);
}
static
unsigned
char
signal_from_debug_event
(
DEBUG_EVENT
*
de
)
...
...
@@ -467,7 +467,7 @@ static unsigned char signal_from_debug_event(DEBUG_EVENT* de)
case
EXCEPTION_WINE_NAME_THREAD
:
return
HOST_SIGTRAP
;
default:
ERR
(
"Unknown exception code 0x%08x
\n
"
,
ec
);
ERR
(
"Unknown exception code 0x%08
l
x
\n
"
,
ec
);
return
HOST_SIGABRT
;
}
}
...
...
@@ -494,12 +494,12 @@ static BOOL handle_exception(struct gdb_context* gdbctx, EXCEPTION_DEBUG_INFO* e
if
(
gdbctx
->
process
->
process_io
->
read
(
gdbctx
->
process
->
handle
,
threadname
->
szName
,
name
,
sizeof
(
name
),
&
read
)
&&
read
==
sizeof
(
name
))
{
fprintf
(
stderr
,
"Thread ID=%04x renamed to
\"
%.9s
\"\n
"
,
fprintf
(
stderr
,
"Thread ID=%04
l
x renamed to
\"
%.9s
\"\n
"
,
threadname
->
dwThreadID
,
name
);
}
}
else
ERR
(
"Cannot set name of thread %04x
\n
"
,
threadname
->
dwThreadID
);
ERR
(
"Cannot set name of thread %04
l
x
\n
"
,
threadname
->
dwThreadID
);
return
TRUE
;
}
case
EXCEPTION_INVALID_HANDLE
:
...
...
@@ -536,7 +536,7 @@ 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
,
"%04
x:%04x: create process '%s'/%p @%p (%u<%
u>)
\n
"
,
fprintf
(
stderr
,
"%04
lx:%04lx: create process '%s'/%p @%p (%lu<%l
u>)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
dbg_W2A
(
u
.
buffer
,
-
1
),
de
->
u
.
CreateProcessInfo
.
lpImageName
,
...
...
@@ -548,7 +548,7 @@ static BOOL handle_debug_event(struct gdb_context* gdbctx, BOOL stop_on_dll_load
if
(
!
dbg_init
(
gdbctx
->
process
->
handle
,
u
.
buffer
,
TRUE
))
ERR
(
"Couldn't initiate DbgHelp
\n
"
);
fprintf
(
stderr
,
"%04
x:%04
x: create thread I @%p
\n
"
,
de
->
dwProcessId
,
fprintf
(
stderr
,
"%04
lx:%04l
x: create thread I @%p
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
CreateProcessInfo
.
lpStartAddress
);
dbg_load_module
(
gdbctx
->
process
->
handle
,
de
->
u
.
CreateProcessInfo
.
hFile
,
u
.
buffer
,
...
...
@@ -562,7 +562,7 @@ 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
,
"%04
x:%04x: loads DLL %s @%p (%u<%
u>)
\n
"
,
fprintf
(
stderr
,
"%04
lx:%04lx: loads DLL %s @%p (%lu<%l
u>)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
dbg_W2A
(
u
.
buffer
,
-
1
),
de
->
u
.
LoadDll
.
lpBaseOfDll
,
...
...
@@ -575,7 +575,7 @@ static BOOL handle_debug_event(struct gdb_context* gdbctx, BOOL stop_on_dll_load
return
TRUE
;
case
UNLOAD_DLL_DEBUG_EVENT
:
fprintf
(
stderr
,
"%08
x:%08
x: unload DLL @%p
\n
"
,
fprintf
(
stderr
,
"%08
lx:%08l
x: unload DLL @%p
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
UnloadDll
.
lpBaseOfDll
);
SymUnloadModule
(
gdbctx
->
process
->
handle
,
(
DWORD_PTR
)
de
->
u
.
UnloadDll
.
lpBaseOfDll
);
...
...
@@ -584,7 +584,7 @@ static BOOL handle_debug_event(struct gdb_context* gdbctx, BOOL stop_on_dll_load
return
TRUE
;
case
EXCEPTION_DEBUG_EVENT
:
TRACE
(
"%08
x:%08x: exception code=0x%08
x
\n
"
,
de
->
dwProcessId
,
TRACE
(
"%08
lx:%08lx: exception code=0x%08l
x
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
Exception
.
ExceptionRecord
.
ExceptionCode
);
if
(
handle_exception
(
gdbctx
,
&
de
->
u
.
Exception
))
...
...
@@ -592,7 +592,7 @@ static BOOL handle_debug_event(struct gdb_context* gdbctx, BOOL stop_on_dll_load
break
;
case
CREATE_THREAD_DEBUG_EVENT
:
fprintf
(
stderr
,
"%08
x:%08
x: create thread D @%p
\n
"
,
de
->
dwProcessId
,
fprintf
(
stderr
,
"%08
lx:%08l
x: create thread D @%p
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
CreateThread
.
lpStartAddress
);
dbg_add_thread
(
gdbctx
->
process
,
...
...
@@ -602,14 +602,14 @@ static BOOL handle_debug_event(struct gdb_context* gdbctx, BOOL stop_on_dll_load
return
TRUE
;
case
EXIT_THREAD_DEBUG_EVENT
:
fprintf
(
stderr
,
"%08
x:%08x: exit thread (%
u)
\n
"
,
fprintf
(
stderr
,
"%08
lx:%08lx: exit thread (%l
u)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
ExitThread
.
dwExitCode
);
if
((
thread
=
dbg_get_thread
(
gdbctx
->
process
,
de
->
dwThreadId
)))
dbg_del_thread
(
thread
);
return
TRUE
;
case
EXIT_PROCESS_DEBUG_EVENT
:
fprintf
(
stderr
,
"%08
x:%08x: exit process (%
u)
\n
"
,
fprintf
(
stderr
,
"%08
lx:%08lx: exit process (%l
u)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
ExitProcess
.
dwExitCode
);
dbg_del_process
(
gdbctx
->
process
);
...
...
@@ -620,17 +620,17 @@ static BOOL handle_debug_event(struct gdb_context* gdbctx, BOOL stop_on_dll_load
memory_get_string
(
gdbctx
->
process
,
de
->
u
.
DebugString
.
lpDebugStringData
,
TRUE
,
de
->
u
.
DebugString
.
fUnicode
,
u
.
bufferA
,
sizeof
(
u
.
bufferA
));
fprintf
(
stderr
,
"%08
x:%08
x: output debug string (%s)
\n
"
,
fprintf
(
stderr
,
"%08
lx:%08l
x: output debug string (%s)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
debugstr_a
(
u
.
bufferA
));
return
TRUE
;
case
RIP_EVENT
:
fprintf
(
stderr
,
"%08
x:%08x: rip error=%u type=%
u
\n
"
,
de
->
dwProcessId
,
fprintf
(
stderr
,
"%08
lx:%08lx: rip error=%lu type=%l
u
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
RipInfo
.
dwError
,
de
->
u
.
RipInfo
.
dwType
);
return
TRUE
;
default:
FIXME
(
"%08
x:%08x: unknown event (%
u)
\n
"
,
FIXME
(
"%08
lx:%08lx: unknown event (%l
u)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
dwDebugEventCode
);
}
...
...
@@ -744,7 +744,7 @@ static void get_process_info(struct gdb_context* gdbctx, char* buffer, size_t le
strcpy
(
buffer
,
"Running"
);
}
else
snprintf
(
buffer
,
len
,
"Terminated (%u)"
,
status
);
snprintf
(
buffer
,
len
,
"Terminated (%
l
u)"
,
status
);
switch
(
GetPriorityClass
(
gdbctx
->
process
->
handle
))
{
...
...
@@ -782,12 +782,12 @@ static void get_thread_info(struct gdb_context* gdbctx, unsigned tid,
{
case
-
1
:
break
;
case
0
:
strcpy
(
buffer
,
"Running"
);
break
;
default:
snprintf
(
buffer
,
len
,
"Suspended (%u)"
,
status
-
1
);
default:
snprintf
(
buffer
,
len
,
"Suspended (%
l
u)"
,
status
-
1
);
}
ResumeThread
(
thd
->
handle
);
}
else
snprintf
(
buffer
,
len
,
"Terminated (exit code = %u)"
,
status
);
snprintf
(
buffer
,
len
,
"Terminated (exit code = %
l
u)"
,
status
);
}
else
{
...
...
@@ -1297,7 +1297,7 @@ static enum packet_return packet_write_registers(struct gdb_context* gdbctx)
if
(
!
backend
->
set_context
(
thread
->
handle
,
&
ctx
))
{
ERR
(
"Failed to set context for tid %04
x, error %
u
\n
"
,
thread
->
tid
,
GetLastError
());
ERR
(
"Failed to set context for tid %04
lx, error %l
u
\n
"
,
thread
->
tid
,
GetLastError
());
return
packet_error
;
}
...
...
@@ -1463,7 +1463,7 @@ static enum packet_return packet_write_register(struct gdb_context* gdbctx)
cpu_register_hex_from
(
gdbctx
,
&
ctx
,
reg
,
(
const
char
**
)
&
ptr
);
if
(
!
backend
->
set_context
(
thread
->
handle
,
&
ctx
))
{
ERR
(
"Failed to set context for tid %04
x, error %
u
\n
"
,
thread
->
tid
,
GetLastError
());
ERR
(
"Failed to set context for tid %04
lx, error %l
u
\n
"
,
thread
->
tid
,
GetLastError
());
return
packet_error
;
}
...
...
@@ -1486,7 +1486,7 @@ static void packet_query_monitor_wnd_helper(struct gdb_context* gdbctx, HWND hWn
packet_reply_open
(
gdbctx
);
packet_reply_add
(
gdbctx
,
"O"
);
snprintf
(
buffer
,
sizeof
(
buffer
),
"%*s%04Ix%*s%-17.17s %08x %0*Ix %.14s
\n
"
,
"%*s%04Ix%*s%-17.17s %08
l
x %0*Ix %.14s
\n
"
,
indent
,
""
,
(
ULONG_PTR
)
hWnd
,
13
-
indent
,
""
,
clsName
,
GetWindowLongW
(
hWnd
,
GWL_STYLE
),
addr_width
(
gdbctx
),
(
ULONG_PTR
)
GetWindowLongPtrW
(
hWnd
,
GWLP_WNDPROC
),
...
...
@@ -1550,7 +1550,7 @@ static void packet_query_monitor_process(struct gdb_context* gdbctx, int len, co
packet_reply_open
(
gdbctx
);
packet_reply_add
(
gdbctx
,
"O"
);
snprintf
(
buffer
,
sizeof
(
buffer
),
"%c%08
x %-8d %08
x '%s'
\n
"
,
"%c%08
lx %-8ld %08l
x '%s'
\n
"
,
deco
,
entry
.
th32ProcessID
,
entry
.
cntThreads
,
entry
.
th32ParentProcessID
,
entry
.
szExeFile
);
packet_reply_hex_to_str
(
gdbctx
,
buffer
);
...
...
programs/winedbg/info.c
View file @
b0319099
...
...
@@ -392,7 +392,7 @@ static void info_window(HWND hWnd, int indent)
if
(
!
GetWindowTextA
(
hWnd
,
wndName
,
sizeof
(
wndName
)))
strcpy
(
wndName
,
"-- Empty --"
);
dbg_printf
(
"%*s%08Ix%*s %-17.17s %08
x %0*Ix %08
x %.14s
\n
"
,
dbg_printf
(
"%*s%08Ix%*s %-17.17s %08
lx %0*Ix %08l
x %.14s
\n
"
,
indent
,
""
,
(
DWORD_PTR
)
hWnd
,
12
-
indent
,
""
,
clsName
,
GetWindowLongW
(
hWnd
,
GWL_STYLE
),
ADDRWIDTH
,
(
ULONG_PTR
)
GetWindowLongPtrW
(
hWnd
,
GWLP_WNDPROC
),
...
...
@@ -435,8 +435,8 @@ void info_win32_window(HWND hWnd, BOOL detailed)
/* FIXME missing fields: hmemTaskQ, hrgnUpdate, dce, flags, pProp, scroll */
dbg_printf
(
"next=%p child=%p parent=%p owner=%p class='%s'
\n
"
"inst=%p active=%p idmenu=%08Ix
\n
"
"style=0x%08
x exstyle=0x%08
x wndproc=%p text='%s'
\n
"
"client=%
d,%d-%d,%d window=%d,%d-%d,%
d sysmenu=%p
\n
"
,
"style=0x%08
lx exstyle=0x%08l
x wndproc=%p text='%s'
\n
"
"client=%
ld,%ld-%ld,%ld window=%ld,%ld-%ld,%l
d sysmenu=%p
\n
"
,
GetWindow
(
hWnd
,
GW_HWNDNEXT
),
GetWindow
(
hWnd
,
GW_CHILD
),
GetParent
(
hWnd
),
...
...
@@ -502,7 +502,7 @@ static void dump_proc_info(const struct dump_proc* dp, unsigned idx, unsigned de
{
assert
(
idx
<
dp
->
count
);
dpe
=
&
dp
->
entries
[
idx
];
dbg_printf
(
"%c%08
x %-8
d "
,
dbg_printf
(
"%c%08
lx %-8l
d "
,
(
dpe
->
proc
.
th32ProcessID
==
(
dbg_curr_process
?
dbg_curr_process
->
pid
:
0
))
?
'>'
:
' '
,
dpe
->
proc
.
th32ProcessID
,
dpe
->
proc
.
cntThreads
);
...
...
@@ -616,11 +616,11 @@ void info_win32_threads(void)
else
exename
=
""
;
dbg_printf
(
"%08x%s %s
\n
"
,
dbg_printf
(
"%08
l
x%s %s
\n
"
,
entry
.
th32OwnerProcessID
,
p
?
" (D)"
:
""
,
exename
);
lastProcessId
=
entry
.
th32OwnerProcessID
;
}
dbg_printf
(
"
\t
%08
x %4
d%s
\n
"
,
dbg_printf
(
"
\t
%08
lx %4l
d%s
\n
"
,
entry
.
th32ThreadID
,
entry
.
tpBasePri
,
(
entry
.
th32ThreadID
==
dbg_curr_tid
)
?
" <=="
:
""
);
...
...
@@ -657,12 +657,12 @@ void info_win32_frame_exceptions(DWORD tid)
if
(
!
thread
)
{
dbg_printf
(
"Unknown thread id (%04x) in current process
\n
"
,
tid
);
dbg_printf
(
"Unknown thread id (%04
l
x) in current process
\n
"
,
tid
);
return
;
}
if
(
SuspendThread
(
thread
->
handle
)
==
-
1
)
{
dbg_printf
(
"Can't suspend thread id (%04x)
\n
"
,
tid
);
dbg_printf
(
"Can't suspend thread id (%04
l
x)
\n
"
,
tid
);
return
;
}
}
...
...
@@ -715,7 +715,7 @@ void info_win32_segments(DWORD start, int length)
flags
[
1
]
=
(
le
.
HighWord
.
Bits
.
Type
&
0x2
)
?
'w'
:
'-'
;
flags
[
2
]
=
'-'
;
}
dbg_printf
(
"%04
x: sel=%04
x base=%08x limit=%08x %d-bit %c%c%c
\n
"
,
dbg_printf
(
"%04
lx: sel=%04l
x base=%08x limit=%08x %d-bit %c%c%c
\n
"
,
i
,
(
i
<<
3
)
|
7
,
(
le
.
HighWord
.
Bits
.
BaseHi
<<
24
)
+
(
le
.
HighWord
.
Bits
.
BaseMid
<<
16
)
+
le
.
BaseLow
,
...
...
@@ -749,7 +749,7 @@ void info_win32_virtual(DWORD pid)
hProc
=
OpenProcess
(
PROCESS_QUERY_INFORMATION
|
PROCESS_VM_READ
,
FALSE
,
pid
);
if
(
hProc
==
NULL
)
{
dbg_printf
(
"Cannot open process <%04x>
\n
"
,
pid
);
dbg_printf
(
"Cannot open process <%04
l
x>
\n
"
,
pid
);
return
;
}
}
...
...
@@ -968,11 +968,11 @@ void info_win32_exception(void)
(
void
*
)
rec
->
ExceptionInformation
[
1
],
(
void
*
)
rec
->
ExceptionInformation
[
2
],
(
void
*
)
rec
->
ExceptionInformation
[
3
]);
else
dbg_printf
(
"C++ exception with strange parameter count %d or magic 0x%0*Ix"
,
dbg_printf
(
"C++ exception with strange parameter count %
l
d or magic 0x%0*Ix"
,
rec
->
NumberParameters
,
ADDRWIDTH
,
rec
->
ExceptionInformation
[
0
]);
break
;
default:
dbg_printf
(
"0x%08x"
,
rec
->
ExceptionCode
);
dbg_printf
(
"0x%08
l
x"
,
rec
->
ExceptionCode
);
break
;
}
if
(
rec
->
ExceptionFlags
&
EH_STACK_INVALID
)
...
...
@@ -981,7 +981,7 @@ void info_win32_exception(void)
switch
(
addr
.
Mode
)
{
case
AddrModeFlat
:
dbg_printf
(
" in %d-bit code (%s)"
,
dbg_printf
(
" in %
l
d-bit code (%s)"
,
dbg_curr_process
->
be_cpu
->
pointer_size
*
8
,
memory_offset_to_string
(
hexbuf
,
addr
.
Offset
,
0
));
break
;
...
...
programs/winedbg/memory.c
View file @
b0319099
...
...
@@ -114,7 +114,7 @@ BOOL memory_write_value(const struct dbg_lvalue* lvalue, DWORD size, void* value
if
(
!
types_get_info
(
&
lvalue
->
type
,
TI_GET_LENGTH
,
&
os
))
return
FALSE
;
if
(
size
!=
os
)
{
dbg_printf
(
"Size mismatch in memory_write_value, got %
u from type while expecting %
u
\n
"
,
dbg_printf
(
"Size mismatch in memory_write_value, got %
lu from type while expecting %l
u
\n
"
,
(
DWORD
)
os
,
size
);
return
FALSE
;
}
...
...
@@ -531,7 +531,7 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
dbg_printf
(
"%s"
,
val_int
?
"true"
:
"false"
);
break
;
default:
WINE_FIXME
(
"Unsupported basetype %u
\n
"
,
bt
);
WINE_FIXME
(
"Unsupported basetype %
l
u
\n
"
,
bt
);
break
;
}
break
;
...
...
@@ -619,7 +619,7 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
}
break
;
default:
WINE_FIXME
(
"Unsupported tag %u
\n
"
,
tag
);
WINE_FIXME
(
"Unsupported tag %
l
u
\n
"
,
tag
);
break
;
}
}
...
...
@@ -739,7 +739,7 @@ void print_address(const ADDRESS64* addr, BOOLEAN with_line)
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
SymGetLineFromAddr64
(
dbg_curr_process
->
handle
,
lin
,
&
disp
,
&
il
))
dbg_printf
(
" [%s:%u]"
,
il
.
FileName
,
il
.
LineNumber
);
dbg_printf
(
" [%s:%
l
u]"
,
il
.
FileName
,
il
.
LineNumber
);
if
(
im
.
SizeOfStruct
==
0
)
/* don't display again module if address is in module+disp form */
{
im
.
SizeOfStruct
=
sizeof
(
im
);
...
...
@@ -828,6 +828,6 @@ BOOL memory_get_register(DWORD regno, DWORD_PTR** value, char* buffer, int len)
return
TRUE
;
}
}
if
(
buffer
)
snprintf
(
buffer
,
len
,
"<unknown register %u>"
,
regno
);
if
(
buffer
)
snprintf
(
buffer
,
len
,
"<unknown register %
l
u>"
,
regno
);
return
FALSE
;
}
programs/winedbg/stack.c
View file @
b0319099
...
...
@@ -288,7 +288,7 @@ static void stack_print_addr_and_args(void)
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
SymGetLineFromInlineContext
(
dbg_curr_process
->
handle
,
frm
->
linear_pc
,
frm
->
inline_ctx
,
0
,
&
disp
,
&
il
))
dbg_printf
(
" [%s:%u]"
,
il
.
FileName
,
il
.
LineNumber
);
dbg_printf
(
" [%s:%
l
u]"
,
il
.
FileName
,
il
.
LineNumber
);
dbg_printf
(
" in %s"
,
im
.
ModuleName
);
}
else
dbg_printf
(
" in %s (+0x%Ix)"
,
im
.
ModuleName
,
frm
->
linear_pc
-
im
.
BaseOfImage
);
...
...
@@ -333,7 +333,7 @@ static void backtrace_tid(struct dbg_process* pcs, DWORD tid)
struct
dbg_thread
*
thread
=
dbg_curr_thread
;
if
(
!
(
dbg_curr_thread
=
dbg_get_thread
(
pcs
,
tid
)))
dbg_printf
(
"Unknown thread id (%04
x) in process (%04
x)
\n
"
,
tid
,
pcs
->
pid
);
dbg_printf
(
"Unknown thread id (%04
lx) in process (%04l
x)
\n
"
,
tid
,
pcs
->
pid
);
else
{
dbg_ctx_t
ctx
=
{{
0
}};
...
...
@@ -343,7 +343,7 @@ static void backtrace_tid(struct dbg_process* pcs, DWORD tid)
{
if
(
!
pcs
->
be_cpu
->
get_context
(
dbg_curr_thread
->
handle
,
&
ctx
))
{
dbg_printf
(
"Can't get context for thread %04x in current process
\n
"
,
dbg_printf
(
"Can't get context for thread %04
l
x in current process
\n
"
,
tid
);
}
else
...
...
@@ -353,7 +353,7 @@ static void backtrace_tid(struct dbg_process* pcs, DWORD tid)
}
ResumeThread
(
dbg_curr_thread
->
handle
);
}
else
dbg_printf
(
"Can't suspend thread %04x in current process
\n
"
,
tid
);
else
dbg_printf
(
"Can't suspend thread %04
l
x in current process
\n
"
,
tid
);
}
dbg_curr_thread
=
thread
;
dbg_curr_tid
=
thread
?
thread
->
tid
:
0
;
...
...
@@ -399,7 +399,7 @@ static void backtrace_all(void)
{
if
(
!
dbg_attach_debuggee
(
entry
.
th32OwnerProcessID
))
{
dbg_printf
(
"
\n
warning: could not attach to %04x
\n
"
,
dbg_printf
(
"
\n
warning: could not attach to %04
l
x
\n
"
,
entry
.
th32OwnerProcessID
);
continue
;
}
...
...
@@ -407,7 +407,7 @@ static void backtrace_all(void)
dbg_active_wait_for_first_exception
();
}
dbg_printf
(
"
\n
Backtracing for thread %04
x in process %04
x (%s):
\n
"
,
dbg_printf
(
"
\n
Backtracing for thread %04
lx in process %04l
x (%s):
\n
"
,
entry
.
th32ThreadID
,
dbg_curr_pid
,
dbg_W2A
(
dbg_curr_process
->
imageName
,
-
1
));
backtrace_tid
(
dbg_curr_process
,
entry
.
th32ThreadID
);
...
...
programs/winedbg/symbol.c
View file @
b0319099
...
...
@@ -597,7 +597,7 @@ enum dbg_line_status symbol_get_function_line_status(const ADDRESS64* addr)
case
SymTagFunction
:
case
SymTagPublicSymbol
:
break
;
default:
WINE_FIXME
(
"Unexpected sym-tag 0x%08x
\n
"
,
sym
->
Tag
);
WINE_FIXME
(
"Unexpected sym-tag 0x%08
l
x
\n
"
,
sym
->
Tag
);
case
SymTagData
:
return
dbg_no_line_info
;
}
...
...
programs/winedbg/tgt_active.c
View file @
b0319099
...
...
@@ -74,7 +74,7 @@ BOOL dbg_attach_debuggee(DWORD pid)
if
(
!
DebugActiveProcess
(
pid
))
{
dbg_printf
(
"Can't attach process %04
x: error %
u
\n
"
,
pid
,
GetLastError
());
dbg_printf
(
"Can't attach process %04
lx: error %l
u
\n
"
,
pid
,
GetLastError
());
dbg_del_process
(
dbg_curr_process
);
return
FALSE
;
}
...
...
@@ -196,7 +196,7 @@ static BOOL dbg_exception_prolog(BOOL is_debug, const EXCEPTION_RECORD* rec)
HeapFree
(
GetProcessHeap
(),
0
,
last_file
);
last_name
=
strcpy
(
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
si
->
Name
)
+
1
),
si
->
Name
);
last_file
=
strcpy
(
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
il
.
FileName
)
+
1
),
il
.
FileName
);
dbg_printf
(
"%s () at %s:%u
\n
"
,
last_name
,
last_file
,
il
.
LineNumber
);
dbg_printf
(
"%s () at %s:%
l
u
\n
"
,
last_name
,
last_file
,
il
.
LineNumber
);
}
}
}
...
...
@@ -234,7 +234,7 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance
assert
(
dbg_curr_thread
);
WINE_TRACE
(
"exception=%x first_chance=%c
\n
"
,
WINE_TRACE
(
"exception=%
l
x first_chance=%c
\n
"
,
rec
->
ExceptionCode
,
first_chance
?
'Y'
:
'N'
);
switch
(
rec
->
ExceptionCode
)
...
...
@@ -251,11 +251,11 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance
pThread
=
dbg_get_thread
(
dbg_curr_process
,
pThreadName
->
dwThreadID
);
if
(
!
pThread
)
{
dbg_printf
(
"Thread ID=%04x not in our list of threads -> can't rename
\n
"
,
pThreadName
->
dwThreadID
);
dbg_printf
(
"Thread ID=%04
l
x not in our list of threads -> can't rename
\n
"
,
pThreadName
->
dwThreadID
);
return
DBG_CONTINUE
;
}
if
(
dbg_read_memory
(
pThreadName
->
szName
,
pThread
->
name
,
9
))
dbg_printf
(
"Thread ID=%04x renamed using MS VC6 extension (name==
\"
%.9s
\"
)
\n
"
,
dbg_printf
(
"Thread ID=%04
l
x renamed using MS VC6 extension (name==
\"
%.9s
\"
)
\n
"
,
pThread
->
tid
,
pThread
->
name
);
return
DBG_CONTINUE
;
case
EXCEPTION_INVALID_HANDLE
:
...
...
@@ -332,12 +332,12 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
case
EXCEPTION_DEBUG_EVENT
:
if
(
!
dbg_curr_thread
)
{
WINE_ERR
(
"%04
x:%04
x: not a registered process or thread (perhaps a 16 bit one ?)
\n
"
,
WINE_ERR
(
"%04
lx:%04l
x: not a registered process or thread (perhaps a 16 bit one ?)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
);
break
;
}
WINE_TRACE
(
"%04
x:%04x: exception code=%08
x
\n
"
,
WINE_TRACE
(
"%04
lx:%04lx: exception code=%08l
x
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
Exception
.
ExceptionRecord
.
ExceptionCode
);
...
...
@@ -373,7 +373,7 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
swprintf
(
u
.
buffer
,
ARRAY_SIZE
(
u
.
buffer
),
L"Process_%08x"
,
dbg_curr_pid
);
}
WINE_TRACE
(
"%04
x:%04x: create process '%s'/%p @%p (%u<%
u>)
\n
"
,
WINE_TRACE
(
"%04
lx:%04lx: create process '%s'/%p @%p (%lu<%l
u>)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
wine_dbgstr_w
(
u
.
buffer
),
de
->
u
.
CreateProcessInfo
.
lpImageName
,
...
...
@@ -386,9 +386,9 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
dbg_printf
(
"Couldn't initiate DbgHelp
\n
"
);
if
(
!
dbg_load_module
(
dbg_curr_process
->
handle
,
de
->
u
.
CreateProcessInfo
.
hFile
,
u
.
buffer
,
(
DWORD_PTR
)
de
->
u
.
CreateProcessInfo
.
lpBaseOfImage
,
0
))
dbg_printf
(
"couldn't load main module (%u)
\n
"
,
GetLastError
());
dbg_printf
(
"couldn't load main module (%
l
u)
\n
"
,
GetLastError
());
WINE_TRACE
(
"%04
x:%04
x: create thread I @%p
\n
"
,
WINE_TRACE
(
"%04
lx:%04l
x: create thread I @%p
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
CreateProcessInfo
.
lpStartAddress
);
dbg_curr_thread
=
dbg_add_thread
(
dbg_curr_process
,
...
...
@@ -405,7 +405,7 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
break
;
case
EXIT_PROCESS_DEBUG_EVENT
:
WINE_TRACE
(
"%04
x:%04x: exit process (%
d)
\n
"
,
WINE_TRACE
(
"%04
lx:%04lx: exit process (%l
d)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
ExitProcess
.
dwExitCode
);
if
(
dbg_curr_process
==
NULL
)
...
...
@@ -414,11 +414,11 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
break
;
}
tgt_process_active_close_process
(
dbg_curr_process
,
FALSE
);
dbg_printf
(
"Process of pid=%04x has terminated
\n
"
,
de
->
dwProcessId
);
dbg_printf
(
"Process of pid=%04
l
x has terminated
\n
"
,
de
->
dwProcessId
);
break
;
case
CREATE_THREAD_DEBUG_EVENT
:
WINE_TRACE
(
"%04
x:%04
x: create thread D @%p
\n
"
,
WINE_TRACE
(
"%04
lx:%04l
x: create thread D @%p
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
CreateThread
.
lpStartAddress
);
if
(
dbg_curr_process
==
NULL
)
...
...
@@ -445,7 +445,7 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
break
;
case
EXIT_THREAD_DEBUG_EVENT
:
WINE_TRACE
(
"%04
x:%04x: exit thread (%
d)
\n
"
,
WINE_TRACE
(
"%04
lx:%04lx: exit thread (%l
d)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
ExitThread
.
dwExitCode
);
if
(
dbg_curr_thread
==
NULL
)
...
...
@@ -466,7 +466,7 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
fetch_module_name
(
de
->
u
.
LoadDll
.
lpImageName
,
de
->
u
.
LoadDll
.
lpBaseOfDll
,
u
.
buffer
,
ARRAY_SIZE
(
u
.
buffer
));
WINE_TRACE
(
"%04
x:%04x: loads DLL %s @%p (%u<%
u>)
\n
"
,
WINE_TRACE
(
"%04
lx:%04lx: loads DLL %s @%p (%lu<%l
u>)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
wine_dbgstr_w
(
u
.
buffer
),
de
->
u
.
LoadDll
.
lpBaseOfDll
,
de
->
u
.
LoadDll
.
dwDebugInfoFileOffset
,
...
...
@@ -485,7 +485,7 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
break
;
case
UNLOAD_DLL_DEBUG_EVENT
:
WINE_TRACE
(
"%04
x:%04
x: unload DLL @%p
\n
"
,
WINE_TRACE
(
"%04
lx:%04l
x: unload DLL @%p
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
UnloadDll
.
lpBaseOfDll
);
break_delete_xpoints_from_module
((
DWORD_PTR
)
de
->
u
.
UnloadDll
.
lpBaseOfDll
);
...
...
@@ -502,18 +502,18 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
memory_get_string
(
dbg_curr_process
,
de
->
u
.
DebugString
.
lpDebugStringData
,
TRUE
,
de
->
u
.
DebugString
.
fUnicode
,
u
.
bufferA
,
sizeof
(
u
.
bufferA
));
WINE_TRACE
(
"%04
x:%04
x: output debug string (%s)
\n
"
,
WINE_TRACE
(
"%04
lx:%04l
x: output debug string (%s)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
u
.
bufferA
);
break
;
case
RIP_EVENT
:
WINE_TRACE
(
"%04
x:%04x: rip error=%u type=%
u
\n
"
,
WINE_TRACE
(
"%04
lx:%04lx: rip error=%lu type=%l
u
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
RipInfo
.
dwError
,
de
->
u
.
RipInfo
.
dwType
);
break
;
default:
WINE_TRACE
(
"%04
x:%04x: unknown event (%
x)
\n
"
,
WINE_TRACE
(
"%04
lx:%04lx: unknown event (%l
x)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
dwDebugEventCode
);
}
if
(
!
cont
)
return
TRUE
;
/* stop execution */
...
...
@@ -537,12 +537,12 @@ static void dbg_resume_debuggee(DWORD cont)
if
(
dbg_curr_thread
)
{
if
(
!
dbg_curr_process
->
be_cpu
->
set_context
(
dbg_curr_thread
->
handle
,
&
dbg_context
))
dbg_printf
(
"Cannot set ctx on %04x
\n
"
,
dbg_curr_tid
);
dbg_printf
(
"Cannot set ctx on %04
l
x
\n
"
,
dbg_curr_tid
);
}
}
dbg_interactiveP
=
FALSE
;
if
(
!
ContinueDebugEvent
(
dbg_curr_pid
,
dbg_curr_tid
,
cont
))
dbg_printf
(
"Cannot continue on %04
x (%08
x)
\n
"
,
dbg_curr_tid
,
cont
);
dbg_printf
(
"Cannot continue on %04
lx (%08l
x)
\n
"
,
dbg_curr_tid
,
cont
);
}
static
void
wait_exception
(
void
)
...
...
@@ -836,7 +836,7 @@ static const char *get_windows_version(void)
}
}
snprintf
(
str
,
sizeof
(
str
),
"%
d.%
d (%d)"
,
info
.
dwMajorVersion
,
snprintf
(
str
,
sizeof
(
str
),
"%
ld.%l
d (%d)"
,
info
.
dwMajorVersion
,
info
.
dwMinorVersion
,
info
.
wProductType
);
return
str
;
}
...
...
programs/winedbg/tgt_minidump.c
View file @
b0319099
...
...
@@ -245,7 +245,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
const
char
*
str
;
char
tmp
[
128
];
dbg_printf
(
"WineDbg starting on minidump on pid %04x
\n
"
,
pid
);
dbg_printf
(
"WineDbg starting on minidump on pid %04
l
x
\n
"
,
pid
);
switch
(
msi
->
ProcessorArchitecture
)
{
case
PROCESSOR_ARCHITECTURE_UNKNOWN
:
...
...
@@ -379,7 +379,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
break
;
default:
str
=
"???"
;
break
;
}
dbg_printf
(
" on Windows %s (%u)
\n
"
,
str
,
msi
->
BuildNumber
);
dbg_printf
(
" on Windows %s (%
l
u)
\n
"
,
str
,
msi
->
BuildNumber
);
/* FIXME CSD: msi->CSDVersionRva */
if
(
sizeof
(
MINIDUMP_SYSTEM_INFO
)
+
4
>
dir
->
Location
.
DataSize
&&
...
...
programs/winedbg/types.c
View file @
b0319099
...
...
@@ -68,7 +68,7 @@ dbg_lgint_t types_extract_as_lgint(const struct dbg_lvalue* lvalue,
{
return
(
LONG_PTR
)
memory_to_linear_addr
(
&
lvalue
->
addr
);
}
if
(
tag
!=
SymTagBaseType
&&
lvalue
->
bitlen
)
dbg_printf
(
"Unexpected bitfield on tag %d
\n
"
,
tag
);
if
(
tag
!=
SymTagBaseType
&&
lvalue
->
bitlen
)
dbg_printf
(
"Unexpected bitfield on tag %
l
d
\n
"
,
tag
);
if
(
psize
)
*
psize
=
0
;
if
(
issigned
)
*
issigned
=
FALSE
;
...
...
@@ -124,7 +124,7 @@ dbg_lgint_t types_extract_as_lgint(const struct dbg_lvalue* lvalue,
rtn
=
(
ULONG_PTR
)
memory_to_linear_addr
(
&
lvalue
->
addr
);
break
;
default:
WINE_FIXME
(
"Unsupported tag %u
\n
"
,
tag
);
WINE_FIXME
(
"Unsupported tag %
l
u
\n
"
,
tag
);
RaiseException
(
DEBUG_STATUS_NOT_AN_INTEGER
,
0
,
0
,
NULL
);
}
...
...
@@ -540,7 +540,7 @@ void print_value(const struct dbg_lvalue* lvalue, char format, int level)
print_value
(
&
lvalue_field
,
format
,
level
);
break
;
default:
WINE_FIXME
(
"Unknown tag (%u)
\n
"
,
tag
);
WINE_FIXME
(
"Unknown tag (%
l
u)
\n
"
,
tag
);
RaiseException
(
DEBUG_STATUS_INTERNAL_ERROR
,
0
,
0
,
NULL
);
break
;
}
...
...
@@ -555,7 +555,7 @@ static BOOL CALLBACK print_types_cb(PSYMBOL_INFO sym, ULONG size, void* ctx)
struct
dbg_type
type
;
type
.
module
=
sym
->
ModBase
;
type
.
id
=
sym
->
TypeIndex
;
dbg_printf
(
"Mod: %0*Ix ID: %08x
\n
"
,
ADDRWIDTH
,
type
.
module
,
type
.
id
);
dbg_printf
(
"Mod: %0*Ix ID: %08
l
x
\n
"
,
ADDRWIDTH
,
type
.
module
,
type
.
id
);
types_print_type
(
&
type
,
TRUE
);
dbg_printf
(
"
\n
"
);
return
TRUE
;
...
...
@@ -586,7 +586,7 @@ BOOL types_print_type(const struct dbg_type* type, BOOL details)
if
(
type
->
id
==
dbg_itype_none
||
!
types_get_info
(
type
,
TI_GET_SYMTAG
,
&
tag
))
{
dbg_printf
(
"--invalid--<%xh>--"
,
type
->
id
);
dbg_printf
(
"--invalid--<%
l
xh>--"
,
type
->
id
);
return
FALSE
;
}
...
...
@@ -610,7 +610,7 @@ BOOL types_print_type(const struct dbg_type* type, BOOL details)
case
UdtStruct
:
dbg_printf
(
"struct %ls"
,
name
);
break
;
case
UdtUnion
:
dbg_printf
(
"union %ls"
,
name
);
break
;
case
UdtClass
:
dbg_printf
(
"class %ls"
,
name
);
break
;
default:
WINE_ERR
(
"Unsupported UDT type (%d) for %ls
\n
"
,
udt
,
name
);
break
;
default:
WINE_ERR
(
"Unsupported UDT type (%
l
d) for %ls
\n
"
,
udt
,
name
);
break
;
}
if
(
details
&&
types_get_info
(
type
,
TI_GET_CHILDRENCOUNT
,
&
count
))
...
...
@@ -654,7 +654,7 @@ BOOL types_print_type(const struct dbg_type* type, BOOL details)
subtype
.
module
=
type
->
module
;
types_print_type
(
&
subtype
,
details
);
if
(
types_get_info
(
type
,
TI_GET_COUNT
,
&
count
))
dbg_printf
(
" %ls[%d]"
,
name
,
count
);
dbg_printf
(
" %ls[%
l
d]"
,
name
,
count
);
else
dbg_printf
(
" %ls[]"
,
name
);
break
;
...
...
@@ -706,7 +706,7 @@ BOOL types_print_type(const struct dbg_type* type, BOOL details)
dbg_printf
(
"%ls"
,
name
);
break
;
default:
WINE_ERR
(
"Unknown type %u for %ls
\n
"
,
tag
,
name
);
WINE_ERR
(
"Unknown type %
l
u for %ls
\n
"
,
tag
,
name
);
break
;
}
...
...
@@ -744,7 +744,7 @@ BOOL types_get_info(const struct dbg_type* type, IMAGEHLP_SYMBOL_TYPE_INFO ti, v
case
btLong
:
name
=
L"long int"
;
break
;
case
btULong
:
name
=
L"unsigned long int"
;
break
;
case
btComplex
:
name
=
L"complex"
;
break
;
default:
WINE_FIXME
(
"Unsupported basic type %u
\n
"
,
bt
);
return
FALSE
;
default:
WINE_FIXME
(
"Unsupported basic type %
l
u
\n
"
,
bt
);
return
FALSE
;
}
X
(
WCHAR
*
)
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
name
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
X
(
WCHAR
*
))
...
...
@@ -913,7 +913,7 @@ BOOL types_get_info(const struct dbg_type* type, IMAGEHLP_SYMBOL_TYPE_INFO ti, v
default:
WINE_FIXME
(
"unsupported %u for XMM register
\n
"
,
ti
);
return
FALSE
;
}
break
;
default:
WINE_FIXME
(
"unsupported type id 0x%x
\n
"
,
type
->
id
);
default:
WINE_FIXME
(
"unsupported type id 0x%
l
x
\n
"
,
type
->
id
);
}
#undef X
...
...
@@ -1053,7 +1053,7 @@ BOOL types_compare(struct dbg_type type1, struct dbg_type type2, BOOL* equal)
/* compare argument type */
break
;
default:
dbg_printf
(
"Unsupported yet tag %d
\n
"
,
tag1
);
dbg_printf
(
"Unsupported yet tag %
l
d
\n
"
,
tag1
);
return
FALSE
;
}
}
while
(
types_get_info
(
&
type1
,
TI_GET_TYPE
,
&
type1
.
id
)
&&
...
...
programs/winedbg/winedbg.c
View file @
b0319099
...
...
@@ -451,7 +451,7 @@ struct dbg_thread* dbg_add_thread(struct dbg_process* p, DWORD tid,
t
->
addr_mode
=
AddrModeFlat
;
t
->
suspended
=
FALSE
;
snprintf
(
t
->
name
,
sizeof
(
t
->
name
),
"%04x"
,
tid
);
snprintf
(
t
->
name
,
sizeof
(
t
->
name
),
"%04
l
x"
,
tid
);
list_add_head
(
&
p
->
threads
,
&
t
->
entry
);
...
...
@@ -569,7 +569,7 @@ void dbg_start_interactive(const char* filename, HANDLE hFile)
if
(
dbg_curr_process
)
{
dbg_printf
(
"WineDbg starting on pid %04x
\n
"
,
dbg_curr_pid
);
dbg_printf
(
"WineDbg starting on pid %04
l
x
\n
"
,
dbg_curr_pid
);
if
(
dbg_curr_process
->
active_debuggee
)
dbg_active_wait_for_first_exception
();
}
...
...
@@ -614,7 +614,7 @@ static void restart_if_wow64(void)
GetExitCodeProcess
(
pi
.
hProcess
,
&
exit_code
);
ExitProcess
(
exit_code
);
}
else
WINE_ERR
(
"failed to restart 64-bit %s, err %d
\n
"
,
wine_dbgstr_w
(
filename
),
GetLastError
()
);
else
WINE_ERR
(
"failed to restart 64-bit %s, err %
l
d
\n
"
,
wine_dbgstr_w
(
filename
),
GetLastError
()
);
Wow64RevertWow64FsRedirection
(
redir
);
}
}
...
...
@@ -680,7 +680,7 @@ int main(int argc, char** argv)
hFile
=
parser_generate_command_file
(
argv
[
0
],
NULL
);
if
(
hFile
==
INVALID_HANDLE_VALUE
)
{
dbg_printf
(
"Couldn't open temp file (%u)
\n
"
,
GetLastError
());
dbg_printf
(
"Couldn't open temp file (%
l
u)
\n
"
,
GetLastError
());
return
1
;
}
argc
--
;
argv
++
;
...
...
@@ -694,7 +694,7 @@ int main(int argc, char** argv)
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
0
);
if
(
hFile
==
INVALID_HANDLE_VALUE
)
{
dbg_printf
(
"Couldn't open file %s (%u)
\n
"
,
argv
[
0
],
GetLastError
());
dbg_printf
(
"Couldn't open file %s (%
l
u)
\n
"
,
argv
[
0
],
GetLastError
());
return
1
;
}
argc
--
;
argv
++
;
...
...
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