base: Use the correct string size in BaseRemoteGDB::cmd_query_var.
The size of the command should be len, the length of the command string, not len - 1. Looking at query strings shows that they were previously being truncated by one character. Change-Id: I283891eadafaa07d12453f085e8a106d59a4f889 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44026 Reviewed-by: Boris Shingarov <shingarov@gmail.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -922,7 +922,7 @@ BaseRemoteGDB::cmd_mem_w(GdbCommand::Context &ctx)
|
||||
bool
|
||||
BaseRemoteGDB::cmd_query_var(GdbCommand::Context &ctx)
|
||||
{
|
||||
std::string s(ctx.data, ctx.len - 1);
|
||||
std::string s(ctx.data, ctx.len);
|
||||
std::string xfer_read_prefix = "Xfer:features:read:";
|
||||
if (s.rfind("Supported:", 0) == 0) {
|
||||
std::ostringstream oss;
|
||||
|
||||
Reference in New Issue
Block a user