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
f91948ad
Commit
f91948ad
authored
Feb 03, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Extend print_typed_basic to handle unicode strings.
parent
0a22cd2b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
memory.c
programs/winedbg/memory.c
+23
-18
No files found.
programs/winedbg/memory.c
View file @
f91948ad
...
...
@@ -347,6 +347,7 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
DWORD
tag
,
size
,
count
,
bt
;
struct
dbg_type
type
=
lvalue
->
type
;
struct
dbg_type
sub_type
;
struct
dbg_lvalue
sub_lvalue
;
if
(
!
types_get_real_type
(
&
type
,
&
tag
))
return
;
...
...
@@ -383,6 +384,11 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
print_char:
if
(
size
==
1
&&
(
val_int
<
0x20
||
val_int
>
0x80
))
dbg_printf
(
"%d"
,
(
int
)
val_int
);
else
if
(
size
==
2
)
{
WCHAR
wch
=
(
WCHAR
)
val_int
;
dbg_outputW
(
&
wch
,
1
);
}
else
dbg_printf
(
"'%c'"
,
(
char
)
val_int
);
break
;
...
...
@@ -396,32 +402,31 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
}
break
;
case
SymTagPointerType
:
if
(
!
memory_read_value
(
lvalue
,
sizeof
(
void
*
),
&
val_ptr
))
return
;
sub_type
.
module
=
lvalue
->
type
.
module
;
if
(
!
types_get_info
(
&
type
,
TI_GET_TYPE
,
&
sub_type
.
id
)
||
sub_type
.
id
==
dbg_itype_none
)
if
(
!
types_deref
(
lvalue
,
&
sub_lvalue
))
{
dbg_printf
(
"Internal symbol error: unable to access memory location %p"
,
val_ptr
);
dbg_printf
(
"Internal symbol error: unable to access memory location %p"
,
memory_to_linear_addr
(
&
lvalue
->
addr
));
break
;
}
if
(
!
types_get_real_type
(
&
sub_type
,
&
tag
))
return
;
if
(
types_get_info
(
&
sub_type
,
TI_GET_SYMTAG
,
&
tag
)
&&
tag
==
SymTagBaseType
&&
types_get_info
(
&
sub_type
,
TI_GET_BASETYPE
,
&
bt
)
&&
(
bt
==
btChar
||
bt
==
btInt
)
&&
types_get_info
(
&
sub_type
,
TI_GET_LENGTH
,
&
size64
)
&&
size64
==
1
)
val_ptr
=
memory_to_linear_addr
(
&
sub_lvalue
.
addr
);
if
(
types_get_real_type
(
&
sub_lvalue
.
type
,
&
tag
)
&&
tag
==
SymTagBaseType
&&
types_get_info
(
&
sub_lvalue
.
type
,
TI_GET_BASETYPE
,
&
bt
)
&&
types_get_info
(
&
sub_lvalue
.
type
,
TI_GET_LENGTH
,
&
size64
))
{
char
buffer
[
1024
];
if
(
!
val_ptr
)
dbg_printf
(
"0x0"
);
else
if
(
memory_get_string
(
dbg_curr_process
,
val_ptr
,
lvalue
->
cookie
==
DLV_TARGET
,
size64
==
2
,
buffer
,
sizeof
(
buffer
)))
dbg_printf
(
"
\"
%s
\"
"
,
buffer
);
else
dbg_printf
(
"*** invalid address %p ***"
,
val_ptr
);
else
if
(((
bt
==
btChar
||
bt
==
btInt
)
&&
size64
==
1
)
||
(
bt
==
btUInt
&&
size64
==
2
))
{
if
(
memory_get_string
(
dbg_curr_process
,
val_ptr
,
sub_lvalue
.
cookie
==
DLV_TARGET
,
size64
==
2
,
buffer
,
sizeof
(
buffer
)))
dbg_printf
(
"
\"
%s
\"
"
,
buffer
);
else
dbg_printf
(
"*** invalid address %p ***"
,
val_ptr
);
break
;
}
}
else
dbg_printf
(
"%p"
,
val_ptr
);
dbg_printf
(
"%p"
,
val_ptr
);
break
;
case
SymTagArrayType
:
case
SymTagUDT
:
...
...
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