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
387ca9ba
Commit
387ca9ba
authored
Aug 07, 2003
by
Richard Cohen
Committed by
Alexandre Julliard
Aug 07, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Print short ASCII strings without the "..."
- Make printing for Unicode strings more similar to ASCII.
parent
ad302ff7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
30 deletions
+30
-30
memory.c
programs/winedbg/memory.c
+27
-20
types.c
programs/winedbg/types.c
+3
-10
No files found.
programs/winedbg/memory.c
View file @
387ca9ba
...
...
@@ -336,6 +336,8 @@ void DEBUG_ExamineMemory( const DBG_VALUE *_value, int count, char format )
}
}
#define CHARBUFSIZE 16
/******************************************************************
* DEBUG_PrintStringA
*
...
...
@@ -346,38 +348,43 @@ void DEBUG_ExamineMemory( const DBG_VALUE *_value, int count, char format )
int
DEBUG_PrintStringA
(
int
chnl
,
const
DBG_ADDR
*
address
,
int
len
)
{
char
*
lin
=
(
void
*
)
DEBUG_ToLinear
(
address
);
char
ach
[
16
+
1
];
int
i
,
l
;
char
ch
[
CHARBUFSIZE
+
1
];
int
written
=
0
;
if
(
len
==
-
1
)
len
=
32767
;
/* should be big enough */
for
(
i
=
len
;
i
>
0
;
i
-=
l
)
while
(
written
<
len
)
{
l
=
min
(
sizeof
(
ach
)
-
1
,
i
);
DEBUG_READ_MEM_VERBOSE
(
lin
,
ach
,
l
);
ach
[
l
]
=
'\0'
;
/* protect from displaying junk */
l
=
strlen
(
ach
);
DEBUG_OutputA
(
chnl
,
ach
,
l
);
if
(
l
<
sizeof
(
ach
)
-
1
)
break
;
lin
+=
l
;
int
to_write
=
min
(
CHARBUFSIZE
,
len
-
written
);
if
(
!
DEBUG_READ_MEM_VERBOSE
(
lin
,
ch
,
to_write
))
break
;
ch
[
to_write
]
=
'\0'
;
/* protect from displaying junk */
to_write
=
lstrlenA
(
ch
);
DEBUG_OutputA
(
chnl
,
ch
,
to_write
);
lin
+=
to_write
;
written
+=
to_write
;
if
(
to_write
<
CHARBUFSIZE
)
break
;
}
return
len
-
i
;
/* number of actually written chars */
return
written
;
/* number of actually written chars */
}
int
DEBUG_PrintStringW
(
int
chnl
,
const
DBG_ADDR
*
address
,
int
len
)
{
char
*
lin
=
(
void
*
)
DEBUG_ToLinear
(
address
);
WCHAR
wch
;
int
ret
=
0
;
WCHAR
ch
[
CHARBUFSIZE
+
1
]
;
int
written
=
0
;
if
(
len
==
-
1
)
len
=
32767
;
/* should be big enough */
while
(
len
--
)
while
(
written
<
len
)
{
if
(
!
DEBUG_READ_MEM_VERBOSE
(
lin
,
&
wch
,
sizeof
(
wch
))
||
!
wch
)
break
;
lin
+=
sizeof
(
wch
);
DEBUG_OutputW
(
chnl
,
&
wch
,
1
);
ret
++
;
int
to_write
=
min
(
CHARBUFSIZE
,
len
-
written
);
if
(
!
DEBUG_READ_MEM_VERBOSE
(
lin
,
ch
,
to_write
*
sizeof
(
WCHAR
)))
break
;
ch
[
to_write
]
=
0
;
/* protect from displaying junk */
to_write
=
lstrlenW
(
ch
);
DEBUG_OutputW
(
chnl
,
ch
,
to_write
);
lin
+=
to_write
;
written
+=
to_write
;
if
(
to_write
<
CHARBUFSIZE
)
break
;
}
return
ret
;
return
written
;
/* number of actually written chars */
}
programs/winedbg/types.c
View file @
387ca9ba
...
...
@@ -36,7 +36,7 @@
#define NR_TYPE_HASH 521
int
DEBUG_nchar
;
static
int
DEBUG_maxchar
=
1024
;
static
const
int
DEBUG_maxchar
=
1024
;
struct
en_values
{
...
...
@@ -890,20 +890,14 @@ DEBUG_Print( const DBG_VALUE *value, int count, char format, int level )
switch
(
value
->
cookie
)
{
case
DV_TARGET
:
clen
=
DEBUG_PrintStringA
(
DBG_CHN_MESG
,
&
value
->
addr
,
clen
);
DEBUG_nchar
+
=
DEBUG_PrintStringA
(
DBG_CHN_MESG
,
&
value
->
addr
,
clen
);
break
;
case
DV_HOST
:
DEBUG_OutputA
(
DBG_CHN_MESG
,
pnt
,
clen
);
break
;
default:
assert
(
0
);
}
DEBUG_nchar
+=
clen
;
if
(
clen
!=
len
)
{
DEBUG_Printf
(
DBG_CHN_MESG
,
"...
\"
"
);
goto
leave
;
}
DEBUG_nchar
+=
DEBUG_Printf
(
DBG_CHN_MESG
,
"
\"
"
);
DEBUG_nchar
+=
DEBUG_Printf
(
DBG_CHN_MESG
,
(
len
>
clen
)
?
"...
\"
"
:
"
\"
"
);
break
;
}
val1
=
*
value
;
...
...
@@ -943,7 +937,6 @@ leave:
{
DEBUG_nchar
+=
DEBUG_Printf
(
DBG_CHN_MESG
,
"
\n
"
);
}
return
;
}
static
void
DEBUG_DumpAType
(
struct
datatype
*
dt
,
BOOL
deep
)
...
...
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