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
7ca25148
Commit
7ca25148
authored
Nov 24, 2006
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Added basic support for printing 64bit wide entities.
parent
135f2e1b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
17 deletions
+31
-17
debugger.h
programs/winedbg/debugger.h
+1
-0
memory.c
programs/winedbg/memory.c
+9
-5
types.c
programs/winedbg/types.c
+21
-12
No files found.
programs/winedbg/debugger.h
View file @
7ca25148
...
...
@@ -392,6 +392,7 @@ extern void print_value(const struct dbg_lvalue* addr, char format,
extern
int
types_print_type
(
const
struct
dbg_type
*
,
BOOL
details
);
extern
int
print_types
(
void
);
extern
long
int
types_extract_as_integer
(
const
struct
dbg_lvalue
*
);
extern
LONGLONG
types_extract_as_longlong
(
const
struct
dbg_lvalue
*
);
extern
void
types_extract_as_address
(
const
struct
dbg_lvalue
*
,
ADDRESS64
*
);
extern
BOOL
types_deref
(
const
struct
dbg_lvalue
*
value
,
struct
dbg_lvalue
*
result
);
extern
BOOL
types_udt_find_element
(
struct
dbg_lvalue
*
value
,
const
char
*
name
,
long
int
*
tmpbuf
);
...
...
programs/winedbg/memory.c
View file @
7ca25148
...
...
@@ -466,7 +466,7 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
*/
void
print_basic
(
const
struct
dbg_lvalue
*
lvalue
,
int
count
,
char
format
)
{
long
int
res
;
LONGLONG
res
;
if
(
lvalue
->
type
.
id
==
dbg_itype_none
)
{
...
...
@@ -474,17 +474,18 @@ void print_basic(const struct dbg_lvalue* lvalue, int count, char format)
return
;
}
res
=
types_extract_as_
integer
(
lvalue
);
res
=
types_extract_as_
longlong
(
lvalue
);
/* FIXME: this implies i386 byte ordering */
switch
(
format
)
{
case
'x'
:
dbg_printf
(
"0x%lx"
,
res
);
dbg_printf
(
"0x%lx"
,
(
DWORD
)(
ULONG64
)
res
);
break
;
case
'd'
:
dbg_printf
(
"%ld
\n
"
,
res
);
dbg_print_longlong
(
res
,
TRUE
);
dbg_printf
(
"
\n
"
);
break
;
case
'c'
:
...
...
@@ -507,7 +508,10 @@ void print_basic(const struct dbg_lvalue* lvalue, int count, char format)
dbg_printf
(
"Format specifier '%c' is meaningless in 'print' command
\n
"
,
format
);
case
0
:
if
(
lvalue
->
type
.
id
==
dbg_itype_segptr
)
dbg_printf
(
"%ld"
,
res
);
{
dbg_print_longlong
(
res
,
TRUE
);
dbg_printf
(
"
\n
"
);
}
else
print_typed_basic
(
lvalue
);
break
;
...
...
programs/winedbg/types.c
View file @
7ca25148
...
...
@@ -48,15 +48,14 @@ BOOL types_get_real_type(struct dbg_type* type, DWORD* tag)
}
/******************************************************************
* types_extract_as_
integer
* types_extract_as_
longlong
*
* Given a lvalue, try to get an integral (or pointer/address) value
* out of it
*/
long
int
types_extract_as_integer
(
const
struct
dbg_lvalue
*
lvalue
)
LONGLONG
types_extract_as_longlong
(
const
struct
dbg_lvalue
*
lvalue
)
{
long
int
rtn
;
LONGLONG
val
;
LONGLONG
rtn
;
DWORD
tag
,
bt
;
DWORD64
size
;
struct
dbg_type
type
=
lvalue
->
type
;
...
...
@@ -87,30 +86,29 @@ long int types_extract_as_integer(const struct dbg_lvalue* lvalue)
{
case
btChar
:
case
btInt
:
if
(
!
be_cpu
->
fetch_integer
(
lvalue
,
(
unsigned
)
size
,
TRUE
,
&
val
))
if
(
!
be_cpu
->
fetch_integer
(
lvalue
,
(
unsigned
)
size
,
TRUE
,
&
rtn
))
RaiseException
(
DEBUG_STATUS_INTERNAL_ERROR
,
0
,
0
,
NULL
);
rtn
=
(
long
)
val
;
break
;
case
btUInt
:
if
(
!
be_cpu
->
fetch_integer
(
lvalue
,
(
unsigned
)
size
,
FALSE
,
&
val
))
if
(
!
be_cpu
->
fetch_integer
(
lvalue
,
(
unsigned
)
size
,
FALSE
,
&
rtn
))
RaiseException
(
DEBUG_STATUS_INTERNAL_ERROR
,
0
,
0
,
NULL
);
rtn
=
(
DWORD
)(
DWORD64
)
val
;
break
;
case
btFloat
:
RaiseException
(
DEBUG_STATUS_NOT_AN_INTEGER
,
0
,
0
,
NULL
);
}
break
;
case
SymTagPointerType
:
if
(
!
memory_read_value
(
lvalue
,
sizeof
(
void
*
)
,
&
rtn
))
if
(
!
be_cpu
->
fetch_integer
(
lvalue
,
sizeof
(
void
*
),
FALSE
,
&
rtn
))
RaiseException
(
DEBUG_STATUS_INTERNAL_ERROR
,
0
,
0
,
NULL
);
break
;
case
SymTagArrayType
:
case
SymTagUDT
:
if
(
!
memory_read_value
(
lvalue
,
sizeof
(
rtn
)
,
&
rtn
))
if
(
!
be_cpu
->
fetch_integer
(
lvalue
,
sizeof
(
unsigned
),
FALSE
,
&
rtn
))
RaiseException
(
DEBUG_STATUS_INTERNAL_ERROR
,
0
,
0
,
NULL
);
break
;
case
SymTagEnum
:
if
(
!
memory_read_value
(
lvalue
,
sizeof
(
rtn
),
&
rtn
))
/* FIXME: we don't handle enum size */
if
(
!
be_cpu
->
fetch_integer
(
lvalue
,
sizeof
(
unsigned
),
FALSE
,
&
rtn
))
RaiseException
(
DEBUG_STATUS_INTERNAL_ERROR
,
0
,
0
,
NULL
);
break
;
case
SymTagFunctionType
:
...
...
@@ -126,6 +124,17 @@ long int types_extract_as_integer(const struct dbg_lvalue* lvalue)
}
/******************************************************************
* types_extract_as_integer
*
* Given a lvalue, try to get an integral (or pointer/address) value
* out of it
*/
long
int
types_extract_as_integer
(
const
struct
dbg_lvalue
*
lvalue
)
{
return
types_extract_as_longlong
(
lvalue
);
}
/******************************************************************
* types_extract_as_address
*
*
...
...
@@ -139,7 +148,7 @@ void types_extract_as_address(const struct dbg_lvalue* lvalue, ADDRESS64* addr)
else
{
addr
->
Mode
=
AddrModeFlat
;
addr
->
Offset
=
types_extract_as_
integer
(
lvalue
);
addr
->
Offset
=
types_extract_as_
longlong
(
lvalue
);
}
}
...
...
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