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
9061634a
Commit
9061634a
authored
Dec 01, 2021
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Be more strict when detecting a string from an array.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
13a3340b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
types.c
programs/winedbg/types.c
+21
-16
No files found.
programs/winedbg/types.c
View file @
9061634a
...
...
@@ -519,24 +519,29 @@ void print_value(const struct dbg_lvalue* lvalue, char format, int level)
count
=
1
;
size
=
1
;
types_get_info
(
&
type
,
TI_GET_COUNT
,
&
count
);
types_get_info
(
&
type
,
TI_GET_LENGTH
,
&
size
);
lvalue_field
=
*
lvalue
;
types_get_info
(
&
lvalue_field
.
type
,
TI_GET_TYPE
,
&
lvalue_field
.
type
.
id
);
types_get_real_type
(
&
lvalue_field
.
type
,
&
tag
);
if
(
size
==
count
)
{
unsigned
len
;
char
buffer
[
256
];
/*
* Special handling for character arrays.
*/
/* FIXME should check basic type here (should be a char!!!!)... */
len
=
min
(
count
,
sizeof
(
buffer
));
memory_get_string
(
dbg_curr_process
,
memory_to_linear_addr
(
&
lvalue
->
addr
),
lvalue
->
cookie
==
DLV_TARGET
,
TRUE
,
buffer
,
len
);
dbg_printf
(
"
\"
%s%s
\"
"
,
buffer
,
(
len
<
count
)
?
"..."
:
""
);
break
;
if
(
size
==
count
&&
tag
==
SymTagBaseType
)
{
DWORD
basetype
;
types_get_info
(
&
lvalue_field
.
type
,
TI_GET_BASETYPE
,
&
basetype
);
if
(
basetype
==
btChar
)
{
char
buffer
[
256
];
/*
* Special handling for character arrays.
*/
unsigned
len
=
min
(
count
,
sizeof
(
buffer
));
memory_get_string
(
dbg_curr_process
,
memory_to_linear_addr
(
&
lvalue
->
addr
),
lvalue
->
cookie
==
DLV_TARGET
,
TRUE
,
buffer
,
len
);
dbg_printf
(
"
\"
%s%s
\"
"
,
buffer
,
(
len
<
count
)
?
"..."
:
""
);
break
;
}
}
lvalue_field
=
*
lvalue
;
types_get_info
(
&
type
,
TI_GET_TYPE
,
&
lvalue_field
.
type
.
id
);
dbg_printf
(
"{"
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
...
...
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