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
336c000d
Commit
336c000d
authored
Feb 01, 2008
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedbg: Implemented the pXX request in gdb proxy.
parent
b0912d11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
1 deletion
+28
-1
gdbproxy.c
programs/winedbg/gdbproxy.c
+28
-1
No files found.
programs/winedbg/gdbproxy.c
View file @
336c000d
...
...
@@ -1385,6 +1385,33 @@ static enum packet_return packet_write_memory(struct gdb_context* gdbctx)
return
packet_ok
;
/* FIXME: error while writing ? */
}
static
enum
packet_return
packet_read_register
(
struct
gdb_context
*
gdbctx
)
{
unsigned
reg
;
CONTEXT
ctx
;
CONTEXT
*
pctx
=
&
gdbctx
->
context
;
assert
(
gdbctx
->
in_trap
);
reg
=
hex_to_int
(
gdbctx
->
in_packet
,
gdbctx
->
in_packet_len
);
if
(
reg
>=
cpu_num_regs
)
{
if
(
gdbctx
->
trace
&
GDBPXY_TRC_COMMAND_ERROR
)
fprintf
(
stderr
,
"Register out of bounds %x (%x)
\n
"
,
reg
,
cpu_num_regs
);
return
packet_error
;
}
if
(
dbg_curr_thread
!=
gdbctx
->
other_thread
&&
gdbctx
->
other_thread
)
{
if
(
!
fetch_context
(
gdbctx
,
gdbctx
->
other_thread
->
handle
,
pctx
=
&
ctx
))
return
packet_error
;
}
if
(
gdbctx
->
trace
&
GDBPXY_TRC_COMMAND
)
fprintf
(
stderr
,
"Read register %x => %lx
\n
"
,
reg
,
*
cpu_register
(
pctx
,
reg
));
packet_reply_open
(
gdbctx
);
packet_reply_hex_to
(
gdbctx
,
cpu_register
(
pctx
,
reg
),
4
);
packet_reply_close
(
gdbctx
);
return
packet_done
;
}
static
enum
packet_return
packet_write_register
(
struct
gdb_context
*
gdbctx
)
{
unsigned
reg
;
...
...
@@ -1931,7 +1958,7 @@ static struct packet_entry packet_entries[] =
{
'H'
,
packet_thread
},
{
'm'
,
packet_read_memory
},
{
'M'
,
packet_write_memory
},
/* {'p', packet_read_register}, doesn't seem needed */
{
'p'
,
packet_read_register
},
{
'P'
,
packet_write_register
},
{
'q'
,
packet_query
},
/* {'Q', packet_set}, */
...
...
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