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
67449294
Commit
67449294
authored
Dec 20, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Win64 printf format fixes.
parent
2bc33389
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
82 additions
and
87 deletions
+82
-87
Makefile.in
programs/winedbg/Makefile.in
+0
-1
be_i386.c
programs/winedbg/be_i386.c
+7
-7
break.c
programs/winedbg/break.c
+3
-5
dbg.y
programs/winedbg/dbg.y
+1
-1
gdbproxy.c
programs/winedbg/gdbproxy.c
+0
-0
info.c
programs/winedbg/info.c
+16
-16
memory.c
programs/winedbg/memory.c
+6
-6
stack.c
programs/winedbg/stack.c
+6
-6
symbol.c
programs/winedbg/symbol.c
+1
-1
tgt_active.c
programs/winedbg/tgt_active.c
+29
-31
tgt_minidump.c
programs/winedbg/tgt_minidump.c
+2
-2
types.c
programs/winedbg/types.c
+6
-6
winedbg.c
programs/winedbg/winedbg.c
+5
-5
No files found.
programs/winedbg/Makefile.in
View file @
67449294
...
...
@@ -7,7 +7,6 @@ APPMODE = -mconsole
IMPORTS
=
psapi dbghelp advapi32 kernel32 ntdll
DELAYIMPORTS
=
user32
EXTRALIBS
=
@LIBPOLL@
EXTRADEFS
=
-DWINE_NO_LONG_AS_INT
C_SRCS
=
\
be_alpha.c
\
...
...
programs/winedbg/be_i386.c
View file @
67449294
...
...
@@ -141,10 +141,10 @@ static void be_i386_all_print_context(HANDLE hThread, const CONTEXT* ctx)
dbg_printf
(
" FLSW:%04x"
,
LOWORD
(
ctx
->
FloatSave
.
StatusWord
));
/* Isolate the condition code bits - note they are not contiguous */
dbg_printf
(
"(CC:%
ld%ld%ld%ld"
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00004000
)
>>
14
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00000400
)
>>
10
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00000200
)
>>
9
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00000100
)
>>
8
);
dbg_printf
(
"(CC:%
d%d%d%d"
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00004000
)
>>
14
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00000400
)
>>
10
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00000200
)
>>
9
,
(
ctx
->
FloatSave
.
StatusWord
&
0x00000100
)
>>
8
);
/* Now pull out hte 3 bit of the TOP stack pointer */
dbg_printf
(
" TOP:%01x"
,
(
unsigned
int
)
(
ctx
->
FloatSave
.
StatusWord
&
0x00003800
)
>>
11
);
...
...
@@ -244,11 +244,11 @@ static void be_i386_print_context(HANDLE hThread, const CONTEXT* ctx, int all_re
break
;
case
AddrModeFlat
:
case
AddrMode1632
:
dbg_printf
(
"
\n
EIP:%08
lx ESP:%08lx EBP:%08lx EFLAGS:%08l
x(%s)
\n
"
,
dbg_printf
(
"
\n
EIP:%08
x ESP:%08x EBP:%08x EFLAGS:%08
x(%s)
\n
"
,
ctx
->
Eip
,
ctx
->
Esp
,
ctx
->
Ebp
,
ctx
->
EFlags
,
buf
);
dbg_printf
(
" EAX:%08lx EBX:%08lx ECX:%08lx EDX:%08l
x
\n
"
,
dbg_printf
(
" EAX:%08x EBX:%08x ECX:%08x EDX:%08
x
\n
"
,
ctx
->
Eax
,
ctx
->
Ebx
,
ctx
->
Ecx
,
ctx
->
Edx
);
dbg_printf
(
" ESI:%08lx EDI:%08l
x
\n
"
,
dbg_printf
(
" ESI:%08x EDI:%08
x
\n
"
,
ctx
->
Esi
,
ctx
->
Edi
);
break
;
}
...
...
programs/winedbg/break.c
View file @
67449294
...
...
@@ -307,9 +307,8 @@ void break_add_break_from_lineno(int lineno, BOOL swbp)
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
!
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
linear
,
&
disp
,
&
il
))
{
dbg_printf
(
"Unable to add breakpoint (unknown address %
l
x)
\n
"
,
linear
);
dbg_printf
(
"Unable to add breakpoint (unknown address %x)
\n
"
,
linear
);
return
;
}
bkln
.
addr
.
Offset
=
0
;
...
...
@@ -725,7 +724,6 @@ static BOOL should_stop(int bpnum)
*/
BOOL
break_should_continue
(
ADDRESS64
*
addr
,
DWORD
code
)
{
DWORD
oldval
=
0
;
enum
dbg_exec_mode
mode
=
dbg_curr_thread
->
exec_mode
;
...
...
@@ -745,8 +743,8 @@ BOOL break_should_continue(ADDRESS64* addr, DWORD code)
case
be_xpoint_watch_write
:
dbg_printf
(
"Stopped on watchpoint %d at "
,
dbg_curr_thread
->
stopped_xpoint
);
print_address
(
addr
,
TRUE
);
dbg_printf
(
"
values: old=%lu new=%l
u
\n
"
,
oldval
,
dbg_curr_process
->
bp
[
dbg_curr_thread
->
stopped_xpoint
].
w
.
oldval
);
dbg_printf
(
"
new value %
u
\n
"
,
dbg_curr_process
->
bp
[
dbg_curr_thread
->
stopped_xpoint
].
w
.
oldval
);
}
return
FALSE
;
}
...
...
programs/winedbg/dbg.y
View file @
67449294
...
...
@@ -434,7 +434,7 @@ static WINE_EXCEPTION_FILTER(wine_dbg_cmd)
dbg_interrupt_debuggee();
return EXCEPTION_CONTINUE_EXECUTION;
default:
dbg_printf("\nException %
l
x\n", GetExceptionCode());
dbg_printf("\nException %x\n", GetExceptionCode());
break;
}
...
...
programs/winedbg/gdbproxy.c
View file @
67449294
This diff is collapsed.
Click to expand it.
programs/winedbg/info.c
View file @
67449294
...
...
@@ -263,7 +263,7 @@ void info_win32_module(DWORD64 base)
HeapFree
(
GetProcessHeap
(),
0
,
im
.
mi
);
if
(
base
&&
!
num_printed
)
dbg_printf
(
"'0x%
lx%08l
x' is not a valid module address
\n
"
,
(
DWORD
)(
base
>>
32
),
(
DWORD
)
base
);
dbg_printf
(
"'0x%
x%08
x' is not a valid module address
\n
"
,
(
DWORD
)(
base
>>
32
),
(
DWORD
)
base
);
}
struct
class_walker
...
...
@@ -330,10 +330,10 @@ void info_win32_class(HWND hWnd, const char* name)
}
dbg_printf
(
"Class '%s':
\n
"
,
name
);
dbg_printf
(
"style=0x%08x wndProc=
0x%08lx
\n
"
dbg_printf
(
"style=0x%08x wndProc=
%p
\n
"
"inst=%p icon=%p cursor=%p bkgnd=%p
\n
"
"clsExtra=%d winExtra=%d
\n
"
,
wca
.
style
,
(
DWORD
)
wca
.
lpfnWndProc
,
wca
.
hInstance
,
wca
.
style
,
wca
.
lpfnWndProc
,
wca
.
hInstance
,
wca
.
hIcon
,
wca
.
hCursor
,
wca
.
hbrBackground
,
wca
.
cbClsExtra
,
wca
.
cbWndExtra
);
...
...
@@ -371,8 +371,8 @@ static void info_window(HWND hWnd, int indent)
if
(
!
GetWindowText
(
hWnd
,
wndName
,
sizeof
(
wndName
)))
strcpy
(
wndName
,
"-- Empty --"
);
dbg_printf
(
"%*s%08
x%*s %-17.17s %08lx %08lx %08l
x %.14s
\n
"
,
indent
,
""
,
(
UINT
)
hWnd
,
12
-
indent
,
""
,
dbg_printf
(
"%*s%08
lx%*s %-17.17s %08x %08x %08
x %.14s
\n
"
,
indent
,
""
,
(
DWORD_PTR
)
hWnd
,
12
-
indent
,
""
,
clsName
,
GetWindowLong
(
hWnd
,
GWL_STYLE
),
GetWindowLongPtr
(
hWnd
,
GWLP_WNDPROC
),
GetWindowThreadProcessId
(
hWnd
,
NULL
),
wndName
);
...
...
@@ -413,9 +413,9 @@ 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=%08
l
x
\n
"
"style=0x%08
lx exstyle=0x%08lx wndproc=0x%08l
x text='%s'
\n
"
"client=%
ld,%ld-%ld,%ld window=%ld,%ld-%ld,%l
d sysmenu=%p
\n
"
,
"inst=%p active=%p idmenu=%08x
\n
"
"style=0x%08
x exstyle=0x%08x wndproc=0x%08
x text='%s'
\n
"
"client=%
d,%d-%d,%d window=%d,%d-%d,%
d sysmenu=%p
\n
"
,
GetWindow
(
hWnd
,
GW_HWNDNEXT
),
GetWindow
(
hWnd
,
GW_CHILD
),
GetParent
(
hWnd
),
...
...
@@ -463,7 +463,7 @@ void info_win32_processes(void)
while
(
ok
)
{
if
(
entry
.
th32ProcessID
!=
GetCurrentProcessId
())
dbg_printf
(
"%c%08
lx %-8ld %08l
x '%s'
\n
"
,
dbg_printf
(
"%c%08
x %-8d %08
x '%s'
\n
"
,
(
entry
.
th32ProcessID
==
current
)
?
'>'
:
' '
,
entry
.
th32ProcessID
,
entry
.
cntThreads
,
entry
.
th32ParentProcessID
,
entry
.
szExeFile
);
...
...
@@ -499,11 +499,11 @@ void info_win32_threads(void)
{
struct
dbg_process
*
p
=
dbg_get_process
(
entry
.
th32OwnerProcessID
);
dbg_printf
(
"%08
l
x%s %s
\n
"
,
dbg_printf
(
"%08x%s %s
\n
"
,
entry
.
th32OwnerProcessID
,
p
?
" (D)"
:
""
,
p
?
p
->
imageName
:
""
);
lastProcessId
=
entry
.
th32OwnerProcessID
;
}
dbg_printf
(
"
\t
%08
lx %4l
d%s
\n
"
,
dbg_printf
(
"
\t
%08
x %4
d%s
\n
"
,
entry
.
th32ThreadID
,
entry
.
tpBasePri
,
(
entry
.
th32ThreadID
==
dbg_curr_tid
)
?
" <=="
:
""
);
...
...
@@ -540,12 +540,12 @@ void info_win32_exceptions(DWORD tid)
if
(
!
thread
)
{
dbg_printf
(
"Unknown thread id (
0x%08l
x) in current process
\n
"
,
tid
);
dbg_printf
(
"Unknown thread id (
%04
x) in current process
\n
"
,
tid
);
return
;
}
if
(
SuspendThread
(
thread
->
handle
)
==
-
1
)
{
dbg_printf
(
"Can't suspend thread id (
0x%08l
x)
\n
"
,
tid
);
dbg_printf
(
"Can't suspend thread id (
%04
x)
\n
"
,
tid
);
return
;
}
}
...
...
@@ -598,7 +598,7 @@ void info_win32_segments(DWORD start, int length)
flags
[
1
]
=
(
le
.
HighWord
.
Bits
.
Type
&
0x2
)
?
'w'
:
'-'
;
flags
[
2
]
=
'-'
;
}
dbg_printf
(
"%04
lx: sel=%04l
x base=%08x limit=%08x %d-bit %c%c%c
\n
"
,
dbg_printf
(
"%04
x: sel=%04
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
,
...
...
@@ -632,7 +632,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 <%
lu
>
\n
"
,
pid
);
dbg_printf
(
"Cannot open process <%
04x
>
\n
"
,
pid
);
return
;
}
}
...
...
@@ -675,7 +675,7 @@ void info_win32_virtual(DWORD pid)
prot
[
0
]
=
'\0'
;
}
dbg_printf
(
"%08lx %08lx %s %s %s
\n
"
,
(
DWORD
)
addr
,
(
DWORD
)
addr
+
mbi
.
RegionSize
-
1
,
state
,
type
,
prot
);
(
DWORD
_PTR
)
addr
,
(
DWORD_PTR
)
addr
+
mbi
.
RegionSize
-
1
,
state
,
type
,
prot
);
if
(
addr
+
mbi
.
RegionSize
<
addr
)
/* wrap around ? */
break
;
addr
+=
mbi
.
RegionSize
;
...
...
programs/winedbg/memory.c
View file @
67449294
...
...
@@ -186,7 +186,7 @@ void memory_examine(const struct dbg_lvalue *lvalue, int count, char format)
memory_report_invalid_addr
(
linear
);
break
;
}
dbg_printf
(
"{%08
l
x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}
\n
"
,
dbg_printf
(
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}
\n
"
,
guid
.
Data1
,
guid
.
Data2
,
guid
.
Data3
,
guid
.
Data4
[
0
],
guid
.
Data4
[
1
],
guid
.
Data4
[
2
],
guid
.
Data4
[
3
],
guid
.
Data4
[
4
],
guid
.
Data4
[
5
],
guid
.
Data4
[
6
],
guid
.
Data4
[
7
]);
...
...
@@ -360,7 +360,7 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
dbg_printf
(
"'%c'"
,
(
char
)
val_int
);
break
;
default:
WINE_FIXME
(
"Unsupported basetype %
l
u
\n
"
,
bt
);
WINE_FIXME
(
"Unsupported basetype %u
\n
"
,
bt
);
break
;
}
break
;
...
...
@@ -454,7 +454,7 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
}
break
;
default:
WINE_FIXME
(
"Unsupported tag %
l
u
\n
"
,
tag
);
WINE_FIXME
(
"Unsupported tag %u
\n
"
,
tag
);
break
;
}
}
...
...
@@ -480,7 +480,7 @@ void print_basic(const struct dbg_lvalue* lvalue, int count, char format)
switch
(
format
)
{
case
'x'
:
dbg_printf
(
"0x%
l
x"
,
(
DWORD
)(
ULONG64
)
res
);
dbg_printf
(
"0x%x"
,
(
DWORD
)(
ULONG64
)
res
);
break
;
case
'd'
:
...
...
@@ -568,7 +568,7 @@ void print_address(const ADDRESS64* addr, BOOLEAN with_line)
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
lin
,
&
disp
,
&
il
))
dbg_printf
(
" [%s:%
l
u]"
,
il
.
FileName
,
il
.
LineNumber
);
dbg_printf
(
" [%s:%u]"
,
il
.
FileName
,
il
.
LineNumber
);
im
.
SizeOfStruct
=
sizeof
(
im
);
if
(
SymGetModuleInfo
(
dbg_curr_process
->
handle
,
(
DWORD_PTR
)
lin
,
&
im
))
dbg_printf
(
" in %s"
,
im
.
ModuleName
);
...
...
@@ -656,6 +656,6 @@ BOOL memory_get_register(DWORD regno, DWORD** value, char* buffer, int len)
return
TRUE
;
}
}
if
(
buffer
)
snprintf
(
buffer
,
len
,
"<unknown register %
l
u>"
,
regno
);
if
(
buffer
)
snprintf
(
buffer
,
len
,
"<unknown register %u>"
,
regno
);
return
FALSE
;
}
programs/winedbg/stack.c
View file @
67449294
...
...
@@ -265,7 +265,7 @@ static void stack_print_addr_and_args(int nf)
il
.
SizeOfStruct
=
sizeof
(
il
);
if
(
SymGetLineFromAddr
(
dbg_curr_process
->
handle
,
ihsf
.
InstructionOffset
,
&
disp
,
&
il
))
dbg_printf
(
" [%s:%
l
u]"
,
il
.
FileName
,
il
.
LineNumber
);
dbg_printf
(
" [%s:%u]"
,
il
.
FileName
,
il
.
LineNumber
);
dbg_printf
(
" in %s"
,
im
.
ModuleName
);
}
else
dbg_printf
(
" in %s (+0x%lx)"
,
...
...
@@ -313,7 +313,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 (
0x%lx) in process (0x%l
x)
\n
"
,
tid
,
pcs
->
pid
);
dbg_printf
(
"Unknown thread id (
%04x) in process (%04
x)
\n
"
,
tid
,
pcs
->
pid
);
else
{
CONTEXT
saved_ctx
=
dbg_context
;
...
...
@@ -325,7 +325,7 @@ static void backtrace_tid(struct dbg_process* pcs, DWORD tid)
{
if
(
!
GetThreadContext
(
dbg_curr_thread
->
handle
,
&
dbg_context
))
{
dbg_printf
(
"Can't get context for thread
0x%l
x in current process
\n
"
,
dbg_printf
(
"Can't get context for thread
%04
x in current process
\n
"
,
tid
);
}
else
...
...
@@ -335,7 +335,7 @@ static void backtrace_tid(struct dbg_process* pcs, DWORD tid)
}
ResumeThread
(
dbg_curr_thread
->
handle
);
}
else
dbg_printf
(
"Can't suspend thread
0x%l
x in current process
\n
"
,
tid
);
else
dbg_printf
(
"Can't suspend thread
%04
x in current process
\n
"
,
tid
);
dbg_context
=
saved_ctx
;
}
dbg_curr_thread
=
thread
;
...
...
@@ -373,7 +373,7 @@ static void backtrace_all(void)
{
if
(
!
dbg_attach_debuggee
(
entry
.
th32OwnerProcessID
,
FALSE
))
{
dbg_printf
(
"
\n
warning: could not attach to
0x%l
x
\n
"
,
dbg_printf
(
"
\n
warning: could not attach to
%04
x
\n
"
,
entry
.
th32OwnerProcessID
);
continue
;
}
...
...
@@ -381,7 +381,7 @@ static void backtrace_all(void)
dbg_active_wait_for_first_exception
();
}
dbg_printf
(
"
\n
Backtracing for thread
0x%lx in process 0x%l
x (%s):
\n
"
,
dbg_printf
(
"
\n
Backtracing for thread
%04x in process %04
x (%s):
\n
"
,
entry
.
th32ThreadID
,
dbg_curr_pid
,
dbg_curr_process
->
imageName
);
backtrace_tid
(
dbg_curr_process
,
entry
.
th32ThreadID
);
}
...
...
programs/winedbg/symbol.c
View file @
67449294
...
...
@@ -482,7 +482,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%08
l
x
\n
"
,
sym
->
Tag
);
WINE_FIXME
(
"Unexpected sym-tag 0x%08x
\n
"
,
sym
->
Tag
);
case
SymTagData
:
return
dbg_no_line_info
;
}
...
...
programs/winedbg/tgt_active.c
View file @
67449294
...
...
@@ -76,7 +76,7 @@ BOOL dbg_attach_debuggee(DWORD pid, BOOL cofe)
if
(
!
DebugActiveProcess
(
pid
))
{
dbg_printf
(
"Can't attach process %
lx: error %ld
\n
"
,
pid
,
GetLastError
());
dbg_printf
(
"Can't attach process %
04x: error %u
\n
"
,
pid
,
GetLastError
());
dbg_del_process
(
dbg_curr_process
);
return
FALSE
;
}
...
...
@@ -203,7 +203,7 @@ static unsigned 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:%
ld
\n
"
,
last_name
,
last_file
,
il
.
LineNumber
);
dbg_printf
(
"%s () at %s:%
u
\n
"
,
last_name
,
last_file
,
il
.
LineNumber
);
}
}
}
...
...
@@ -241,7 +241,7 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance
assert
(
dbg_curr_thread
);
WINE_TRACE
(
"exception=%
l
x first_chance=%c
\n
"
,
WINE_TRACE
(
"exception=%x first_chance=%c
\n
"
,
rec
->
ExceptionCode
,
first_chance
?
'Y'
:
'N'
);
switch
(
rec
->
ExceptionCode
)
...
...
@@ -258,11 +258,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=
0x%l
x not in our list of threads -> can't rename
\n
"
,
pThreadName
->
dwThreadID
);
dbg_printf
(
"Thread ID=
%04
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=
0x%l
x renamed using MS VC6 extension (name==
\"
%s
\"
)
\n
"
,
dbg_printf
(
"Thread ID=
%04
x renamed using MS VC6 extension (name==
\"
%s
\"
)
\n
"
,
pThread
->
tid
,
pThread
->
name
);
return
DBG_CONTINUE
;
}
...
...
@@ -382,7 +382,7 @@ static DWORD dbg_handle_exception(const EXCEPTION_RECORD* rec, BOOL first_chance
dbg_printf
(
"floating point stack check"
);
break
;
default:
dbg_printf
(
"0x%08
l
x"
,
rec
->
ExceptionCode
);
dbg_printf
(
"0x%08x"
,
rec
->
ExceptionCode
);
break
;
}
}
...
...
@@ -423,7 +423,7 @@ static void fetch_module_name(void* name_addr, BOOL unicode, void* mod_addr,
if
(
!
(
h
=
GetModuleHandleA
(
"psapi"
))
||
!
(
gpif
=
(
void
*
)
GetProcAddress
(
h
,
"GetProcessImageFileName"
))
||
!
(
gpif
)(
dbg_curr_process
->
handle
,
buffer
,
bufsz
))
snprintf
(
buffer
,
bufsz
,
"Process_%08
l
x"
,
dbg_curr_pid
);
snprintf
(
buffer
,
bufsz
,
"Process_%08x"
,
dbg_curr_pid
);
}
else
snprintf
(
buffer
,
bufsz
,
"DLL_%p"
,
mod_addr
);
...
...
@@ -448,12 +448,12 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
case
EXCEPTION_DEBUG_EVENT
:
if
(
!
dbg_curr_thread
)
{
WINE_ERR
(
"%0
8lx:%08l
x: not a registered process or thread (perhaps a 16 bit one ?)
\n
"
,
WINE_ERR
(
"%0
4x:%04
x: not a registered process or thread (perhaps a 16 bit one ?)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
);
break
;
}
WINE_TRACE
(
"%0
8lx:%08lx: exception code=%08l
x
\n
"
,
WINE_TRACE
(
"%0
4x:%04x: exception code=%08
x
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
Exception
.
ExceptionRecord
.
ExceptionCode
);
...
...
@@ -486,10 +486,10 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
de
->
u
.
CreateProcessInfo
.
lpBaseOfImage
,
buffer
,
sizeof
(
buffer
),
TRUE
);
WINE_TRACE
(
"%0
8lx:%08lx: create process '%s'/%p @%08lx (%ld<%ld
>)
\n
"
,
WINE_TRACE
(
"%0
4x:%04x: create process '%s'/%p @%p (%u<%u
>)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
buffer
,
de
->
u
.
CreateProcessInfo
.
lpImageName
,
(
unsigned
long
)(
void
*
)
de
->
u
.
CreateProcessInfo
.
lpStartAddress
,
de
->
u
.
CreateProcessInfo
.
lpStartAddress
,
de
->
u
.
CreateProcessInfo
.
dwDebugInfoFileOffset
,
de
->
u
.
CreateProcessInfo
.
nDebugInfoSize
);
dbg_set_process_name
(
dbg_curr_process
,
buffer
);
...
...
@@ -498,11 +498,10 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
dbg_printf
(
"Couldn't initiate DbgHelp
\n
"
);
if
(
!
SymLoadModule
(
dbg_curr_process
->
handle
,
de
->
u
.
CreateProcessInfo
.
hFile
,
buffer
,
NULL
,
(
unsigned
long
)
de
->
u
.
CreateProcessInfo
.
lpBaseOfImage
,
0
))
dbg_printf
(
"couldn't load main module (%
lx
)
\n
"
,
GetLastError
());
dbg_printf
(
"couldn't load main module (%
u
)
\n
"
,
GetLastError
());
WINE_TRACE
(
"%08lx:%08lx: create thread I @%08lx
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
(
unsigned
long
)(
void
*
)
de
->
u
.
CreateProcessInfo
.
lpStartAddress
);
WINE_TRACE
(
"%04x:%04x: create thread I @%p
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
CreateProcessInfo
.
lpStartAddress
);
dbg_curr_thread
=
dbg_add_thread
(
dbg_curr_process
,
de
->
dwThreadId
,
...
...
@@ -518,7 +517,7 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
break
;
case
EXIT_PROCESS_DEBUG_EVENT
:
WINE_TRACE
(
"%0
8lx:%08lx: exit process (%l
d)
\n
"
,
WINE_TRACE
(
"%0
4x:%04x: exit process (%
d)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
ExitProcess
.
dwExitCode
);
if
(
dbg_curr_process
==
NULL
)
...
...
@@ -527,13 +526,12 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
break
;
}
tgt_process_active_close_process
(
dbg_curr_process
,
FALSE
);
dbg_printf
(
"Process of pid=
0x%08l
x has terminated
\n
"
,
de
->
dwProcessId
);
dbg_printf
(
"Process of pid=
%04
x has terminated
\n
"
,
de
->
dwProcessId
);
break
;
case
CREATE_THREAD_DEBUG_EVENT
:
WINE_TRACE
(
"%08lx:%08lx: create thread D @%08lx
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
(
unsigned
long
)(
void
*
)
de
->
u
.
CreateThread
.
lpStartAddress
);
WINE_TRACE
(
"%04x:%04x: create thread D @%p
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
CreateThread
.
lpStartAddress
);
if
(
dbg_curr_process
==
NULL
)
{
...
...
@@ -559,7 +557,7 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
break
;
case
EXIT_THREAD_DEBUG_EVENT
:
WINE_TRACE
(
"%0
8lx:%08lx: exit thread (%l
d)
\n
"
,
WINE_TRACE
(
"%0
4x:%04x: exit thread (%
d)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
ExitThread
.
dwExitCode
);
if
(
dbg_curr_thread
==
NULL
)
...
...
@@ -582,9 +580,9 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
de
->
u
.
LoadDll
.
lpBaseOfDll
,
buffer
,
sizeof
(
buffer
),
FALSE
);
WINE_TRACE
(
"%0
8lx:%08lx: loads DLL %s @%08lx (%ld<%ld
>)
\n
"
,
WINE_TRACE
(
"%0
4x:%04x: loads DLL %s @%p (%u<%u
>)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
buffer
,
(
unsigned
long
)
de
->
u
.
LoadDll
.
lpBaseOfDll
,
buffer
,
de
->
u
.
LoadDll
.
lpBaseOfDll
,
de
->
u
.
LoadDll
.
dwDebugInfoFileOffset
,
de
->
u
.
LoadDll
.
nDebugInfoSize
);
SymLoadModule
(
dbg_curr_process
->
handle
,
de
->
u
.
LoadDll
.
hFile
,
buffer
,
NULL
,
...
...
@@ -601,9 +599,9 @@ static unsigned dbg_handle_debug_event(DEBUG_EVENT* de)
break
;
case
UNLOAD_DLL_DEBUG_EVENT
:
WINE_TRACE
(
"%0
8lx:%08lx: unload DLL @%08lx
\n
"
,
WINE_TRACE
(
"%0
4x:%04x: unload DLL @%p
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
(
unsigned
long
)
de
->
u
.
UnloadDll
.
lpBaseOfDll
);
de
->
u
.
UnloadDll
.
lpBaseOfDll
);
break_delete_xpoints_from_module
((
unsigned
long
)
de
->
u
.
UnloadDll
.
lpBaseOfDll
);
SymUnloadModule
(
dbg_curr_process
->
handle
,
(
unsigned
long
)
de
->
u
.
UnloadDll
.
lpBaseOfDll
);
...
...
@@ -619,18 +617,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
,
buffer
,
sizeof
(
buffer
));
WINE_TRACE
(
"%0
8lx:%08l
x: output debug string (%s)
\n
"
,
WINE_TRACE
(
"%0
4x:%04
x: output debug string (%s)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
buffer
);
break
;
case
RIP_EVENT
:
WINE_TRACE
(
"%0
8lx:%08lx: rip error=%ld type=%ld
\n
"
,
WINE_TRACE
(
"%0
4x:%04x: rip error=%u type=%u
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
u
.
RipInfo
.
dwError
,
de
->
u
.
RipInfo
.
dwType
);
break
;
default:
WINE_TRACE
(
"%0
8lx:%08lx: unknown event (%ld
)
\n
"
,
WINE_TRACE
(
"%0
4x:%04x: unknown event (%x
)
\n
"
,
de
->
dwProcessId
,
de
->
dwThreadId
,
de
->
dwDebugEventCode
);
}
if
(
!
cont
)
return
TRUE
;
/* stop execution */
...
...
@@ -654,12 +652,12 @@ static void dbg_resume_debuggee(DWORD cont)
if
(
dbg_curr_thread
)
{
if
(
!
SetThreadContext
(
dbg_curr_thread
->
handle
,
&
dbg_context
))
dbg_printf
(
"Cannot set ctx on %
lu
\n
"
,
dbg_curr_tid
);
dbg_printf
(
"Cannot set ctx on %
04x
\n
"
,
dbg_curr_tid
);
}
}
dbg_interactiveP
=
FALSE
;
if
(
!
ContinueDebugEvent
(
dbg_curr_pid
,
dbg_curr_tid
,
cont
))
dbg_printf
(
"Cannot continue on %
lu (%lu
)
\n
"
,
dbg_curr_tid
,
cont
);
dbg_printf
(
"Cannot continue on %
04x (%08x
)
\n
"
,
dbg_curr_tid
,
cont
);
}
static
void
wait_exception
(
void
)
...
...
@@ -805,7 +803,7 @@ enum dbg_start dbg_active_attach(int argc, char* argv[])
}
if
(
!
SetEvent
((
HANDLE
)
evt
))
{
WINE_ERR
(
"Invalid event handle: %
l
x
\n
"
,
evt
);
WINE_ERR
(
"Invalid event handle: %x
\n
"
,
evt
);
return
start_error_init
;
}
CloseHandle
((
HANDLE
)
evt
);
...
...
programs/winedbg/tgt_minidump.c
View file @
67449294
...
...
@@ -193,7 +193,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 %
lu
\n
"
,
pid
);
dbg_printf
(
"WineDbg starting on minidump on pid %
04x
\n
"
,
pid
);
switch
(
msi
->
ProcessorArchitecture
)
{
case
PROCESSOR_ARCHITECTURE_UNKNOWN
:
...
...
@@ -271,7 +271,7 @@ static enum dbg_start minidump_do_reload(struct tgt_process_minidump_data* data)
break
;
default:
str
=
"???"
;
break
;
}
dbg_printf
(
" on Windows %s (%
l
u)
\n
"
,
str
,
msi
->
BuildNumber
);
dbg_printf
(
" on Windows %s (%u)
\n
"
,
str
,
msi
->
BuildNumber
);
/* FIXME CSD: msi->CSDVersionRva */
}
...
...
programs/winedbg/types.c
View file @
67449294
...
...
@@ -115,7 +115,7 @@ LONGLONG types_extract_as_longlong(const struct dbg_lvalue* lvalue)
rtn
=
(
unsigned
)
memory_to_linear_addr
(
&
lvalue
->
addr
);
break
;
default:
WINE_FIXME
(
"Unsupported tag %
l
u
\n
"
,
tag
);
WINE_FIXME
(
"Unsupported tag %u
\n
"
,
tag
);
RaiseException
(
DEBUG_STATUS_NOT_AN_INTEGER
,
0
,
0
,
NULL
);
break
;
}
...
...
@@ -545,7 +545,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 (%
l
u)
\n
"
,
tag
);
WINE_FIXME
(
"Unknown tag (%u)
\n
"
,
tag
);
RaiseException
(
DEBUG_STATUS_INTERNAL_ERROR
,
0
,
0
,
NULL
);
break
;
}
...
...
@@ -560,7 +560,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: %08
l
x ID: %08lx
\n
"
,
type
.
module
,
type
.
id
);
dbg_printf
(
"Mod: %08x ID: %08lx
\n
"
,
type
.
module
,
type
.
id
);
types_print_type
(
&
type
,
TRUE
);
dbg_printf
(
"
\n
"
);
return
TRUE
;
...
...
@@ -617,7 +617,7 @@ int types_print_type(const struct dbg_type* type, BOOL details)
case
UdtStruct
:
dbg_printf
(
"struct %s"
,
name
);
break
;
case
UdtUnion
:
dbg_printf
(
"union %s"
,
name
);
break
;
case
UdtClass
:
dbg_printf
(
"class %s"
,
name
);
break
;
default:
WINE_ERR
(
"Unsupported UDT type (%
l
d) for %s
\n
"
,
udt
,
name
);
break
;
default:
WINE_ERR
(
"Unsupported UDT type (%d) for %s
\n
"
,
udt
,
name
);
break
;
}
if
(
details
&&
types_get_info
(
type
,
TI_GET_CHILDRENCOUNT
,
&
count
))
...
...
@@ -704,7 +704,7 @@ int types_print_type(const struct dbg_type* type, BOOL details)
dbg_printf
(
name
);
break
;
default:
WINE_ERR
(
"Unknown type %
l
u for %s
\n
"
,
tag
,
name
);
WINE_ERR
(
"Unknown type %u for %s
\n
"
,
tag
,
name
);
break
;
}
...
...
@@ -750,7 +750,7 @@ BOOL types_get_info(const struct dbg_type* type, IMAGEHLP_SYMBOL_TYPE_INFO ti, v
case
btLong
:
name
=
longW
;
break
;
case
btULong
:
name
=
ulongW
;
break
;
case
btComplex
:
name
=
complexW
;
break
;
default:
WINE_FIXME
(
"Unsupported basic type %
ld
\n
"
,
bt
);
return
FALSE
;
default:
WINE_FIXME
(
"Unsupported basic type %
u
\n
"
,
bt
);
return
FALSE
;
}
X
(
WCHAR
*
)
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
name
)
+
1
)
*
sizeof
(
WCHAR
));
if
(
X
(
WCHAR
*
))
...
...
programs/winedbg/winedbg.c
View file @
67449294
...
...
@@ -268,7 +268,7 @@ struct dbg_process* dbg_add_process(const struct be_process_io* pio, DWORD pid,
{
if
(
p
->
handle
!=
0
)
{
WINE_ERR
(
"Process (%
lu
) is already defined
\n
"
,
pid
);
WINE_ERR
(
"Process (%
04x
) is already defined
\n
"
,
pid
);
}
else
{
...
...
@@ -401,7 +401,7 @@ struct dbg_thread* dbg_add_thread(struct dbg_process* p, DWORD tid,
t
->
curr_frame
=
-
1
;
t
->
addr_mode
=
AddrModeFlat
;
snprintf
(
t
->
name
,
sizeof
(
t
->
name
),
"
0x%08l
x"
,
tid
);
snprintf
(
t
->
name
,
sizeof
(
t
->
name
),
"
%04
x"
,
tid
);
t
->
next
=
p
->
threads
;
t
->
prev
=
NULL
;
...
...
@@ -547,7 +547,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 (%
l
u)
\n
"
,
GetLastError
());
dbg_printf
(
"Couldn't open temp file (%u)
\n
"
,
GetLastError
());
return
1
;
}
argc
--
;
argv
++
;
...
...
@@ -560,7 +560,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 (%
l
u)
\n
"
,
argv
[
0
],
GetLastError
());
dbg_printf
(
"Couldn't open file %s (%u)
\n
"
,
argv
[
0
],
GetLastError
());
return
1
;
}
argc
--
;
argv
++
;
...
...
@@ -586,7 +586,7 @@ int main(int argc, char** argv)
if
(
dbg_curr_process
)
{
dbg_printf
(
"WineDbg starting on pid
0x%l
x
\n
"
,
dbg_curr_pid
);
dbg_printf
(
"WineDbg starting on pid
%04
x
\n
"
,
dbg_curr_pid
);
if
(
dbg_curr_process
->
active_debuggee
)
dbg_active_wait_for_first_exception
();
}
...
...
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