Skip to content

Commit

Permalink
Rename DREQ_SET_MEM to DREQ_SET_MEM_BINARY
Browse files Browse the repository at this point in the history
We need to be consistent at naming requests with BINARY because there are both binary and hexadecimal versions of some requests.
  • Loading branch information
rocallahan committed Mar 8, 2024
1 parent 22b4da7 commit 4e9cba6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/GdbServer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ void GdbServer::dispatch_debugger_request(Session& session,
dbg->reply_get_mem(mem);
return;
}
case DREQ_SET_MEM: {
case DREQ_SET_MEM_BINARY: {
// gdb has been observed to send requests of length 0 at
// odd times
// (e.g. before sending the magic write to create a checkpoint)
Expand Down
4 changes: 2 additions & 2 deletions src/GdbServerConnection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@ bool GdbServerConnection::process_packet() {
ret = process_vpacket(payload);
break;
case 'X': {
req = GdbRequest(DREQ_SET_MEM);
req = GdbRequest(DREQ_SET_MEM_BINARY);
req.target = query_thread;
req.mem().addr = strtoul(payload, &payload, 16);
parser_assert(',' == *payload++);
Expand Down Expand Up @@ -1858,7 +1858,7 @@ void GdbServerConnection::reply_get_mem(const vector<uint8_t>& mem) {
}

void GdbServerConnection::reply_set_mem(bool ok) {
DEBUG_ASSERT(DREQ_SET_MEM == req.type);
DEBUG_ASSERT(DREQ_SET_MEM_BINARY == req.type);

write_packet(ok ? "OK" : "E01");

Expand Down
2 changes: 1 addition & 1 deletion src/GdbServerConnection.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ enum GdbRequestType {

/* These use params.mem. */
DREQ_GET_MEM,
DREQ_SET_MEM,
DREQ_SET_MEM_BINARY,
// gdb wants to read the current siginfo_t for a stopped
// tracee. More importantly, this packet arrives at the very
// beginning of a |call foo()| experiment.
Expand Down

0 comments on commit 4e9cba6

Please sign in to comment.