Tidying
This commit is contained in:
@@ -140,8 +140,8 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
StringService::toUint32(command.substr(0, delimiterPos), 16),
|
.gdbStartAddress = StringService::toUint32(command.substr(0, delimiterPos), 16),
|
||||||
StringService::toUint32(command.substr(delimiterPos + 1), 16)
|
.bytes = StringService::toUint32(command.substr(delimiterPos + 1), 16)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,12 +105,12 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
StringService::toUint32(command.substr(0, commaDelimiterPos), 16),
|
.gdbStartAddress = StringService::toUint32(command.substr(0, commaDelimiterPos), 16),
|
||||||
StringService::toUint32(
|
.bytes = StringService::toUint32(
|
||||||
command.substr(commaDelimiterPos + 1, colonDelimiterPos - (commaDelimiterPos + 1)),
|
command.substr(commaDelimiterPos + 1, colonDelimiterPos - (commaDelimiterPos + 1)),
|
||||||
16
|
16
|
||||||
),
|
),
|
||||||
StringService::dataFromHex(command.substr(colonDelimiterPos + 1))
|
.buffer = StringService::dataFromHex(command.substr(colonDelimiterPos + 1))
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
|||||||
private:
|
private:
|
||||||
struct PacketData
|
struct PacketData
|
||||||
{
|
{
|
||||||
std::uint32_t gdbStartAddress;
|
GdbMemoryAddress gdbStartAddress;
|
||||||
std::uint32_t bytes;
|
std::uint32_t bytes;
|
||||||
Targets::TargetMemoryBuffer buffer;
|
Targets::TargetMemoryBuffer buffer;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -140,8 +140,8 @@ namespace DebugServer::Gdb
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
auto socketFileDescriptor = int{0};
|
const auto socketFileDescriptor = ::socket(AF_INET, SOCK_STREAM, 0);
|
||||||
if ((socketFileDescriptor = ::socket(AF_INET, SOCK_STREAM, 0)) == 0) {
|
if (socketFileDescriptor == 0) {
|
||||||
throw ::Exceptions::Exception{"Failed to create socket file descriptor."};
|
throw ::Exceptions::Exception{"Failed to create socket file descriptor."};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user