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
6eb18ae6
Commit
6eb18ae6
authored
May 10, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
May 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Add 'set' command to change data model.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
96ecee32
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
4 deletions
+34
-4
debugger.h
programs/winedbg/debugger.h
+4
-0
types.c
programs/winedbg/types.c
+6
-4
winedbg.c
programs/winedbg/winedbg.c
+24
-0
No files found.
programs/winedbg/debugger.h
View file @
6eb18ae6
...
...
@@ -265,6 +265,7 @@ struct dbg_process
char
source_current_file
[
MAX_PATH
];
int
source_start_line
;
int
source_end_line
;
const
struct
data_model
*
data_model
;
};
/* describes the way the debugger interacts with a given process */
...
...
@@ -550,6 +551,9 @@ struct data_model
unsigned
size
;
const
WCHAR
*
name
;
};
extern
const
struct
data_model
ilp32_data_model
[];
extern
const
struct
data_model
lp64_data_model
[];
extern
const
struct
data_model
llp64_data_model
[];
extern
struct
dbg_internal_var
dbg_internal_vars
[];
...
...
programs/winedbg/types.c
View file @
6eb18ae6
...
...
@@ -714,7 +714,7 @@ BOOL types_print_type(const struct dbg_type* type, BOOL details)
return
TRUE
;
}
static
const
struct
data_model
ilp32_data_model
[]
=
{
const
struct
data_model
ilp32_data_model
[]
=
{
{
btVoid
,
0
,
L"void"
},
{
btChar
,
1
,
L"char"
},
{
btWChar
,
2
,
L"wchar_t"
},
...
...
@@ -741,7 +741,7 @@ static const struct data_model ilp32_data_model[] = {
{
0
,
0
,
NULL
}
};
static
const
struct
data_model
llp64_data_model
[]
=
{
const
struct
data_model
llp64_data_model
[]
=
{
{
btVoid
,
0
,
L"void"
},
{
btChar
,
1
,
L"char"
},
{
btWChar
,
2
,
L"wchar_t"
},
...
...
@@ -770,7 +770,7 @@ static const struct data_model llp64_data_model[] = {
{
0
,
0
,
NULL
}
};
static
const
struct
data_model
lp64_data_model
[]
=
{
const
struct
data_model
lp64_data_model
[]
=
{
{
btVoid
,
0
,
L"void"
},
{
btChar
,
1
,
L"char"
},
{
btWChar
,
2
,
L"wchar_t"
},
...
...
@@ -803,7 +803,9 @@ static const struct data_model* get_data_model(DWORD modaddr)
{
const
struct
data_model
*
model
;
if
(
ADDRSIZE
==
4
)
model
=
ilp32_data_model
;
if
(
dbg_curr_process
->
data_model
)
model
=
dbg_curr_process
->
data_model
;
else
if
(
ADDRSIZE
==
4
)
model
=
ilp32_data_model
;
else
{
IMAGEHLP_MODULEW64
mi
;
...
...
programs/winedbg/winedbg.c
View file @
6eb18ae6
...
...
@@ -284,6 +284,7 @@ struct dbg_process* dbg_add_process(const struct be_process_io* pio, DWORD pid,
p
->
source_current_file
[
0
]
=
'\0'
;
p
->
source_start_line
=
-
1
;
p
->
source_end_line
=
-
1
;
p
->
data_model
=
NULL
;
list_add_head
(
&
dbg_process_list
,
&
p
->
entry
);
...
...
@@ -467,6 +468,29 @@ void dbg_set_option(const char* option, const char* val)
return
;
}
}
else
if
(
!
strcasecmp
(
option
,
"data_model"
))
{
if
(
!
dbg_curr_process
)
{
dbg_printf
(
"Not attached to a process
\n
"
);
return
;
}
if
(
!
val
)
{
const
char
*
model
=
""
;
if
(
dbg_curr_process
->
data_model
==
NULL
)
model
=
"auto"
;
else
if
(
dbg_curr_process
->
data_model
==
ilp32_data_model
)
model
=
"ilp32"
;
else
if
(
dbg_curr_process
->
data_model
==
llp64_data_model
)
model
=
"llp64"
;
else
if
(
dbg_curr_process
->
data_model
==
lp64_data_model
)
model
=
"lp64"
;
dbg_printf
(
"Option: data_model %s
\n
"
,
model
);
}
else
if
(
!
strcasecmp
(
val
,
"auto"
))
dbg_curr_process
->
data_model
=
NULL
;
else
if
(
!
strcasecmp
(
val
,
"ilp32"
))
dbg_curr_process
->
data_model
=
ilp32_data_model
;
else
if
(
!
strcasecmp
(
val
,
"llp64"
))
dbg_curr_process
->
data_model
=
llp64_data_model
;
else
if
(
!
strcasecmp
(
val
,
"lp64"
))
dbg_curr_process
->
data_model
=
lp64_data_model
;
else
dbg_printf
(
"Unknown data model %s
\n
"
,
val
);
}
else
dbg_printf
(
"Unknown option '%s'
\n
"
,
option
);
}
...
...
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