Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/44026 )

Change subject: base: Use the correct string size in BaseRemoteGDB::cmd_query_var.
......................................................................

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
---
M src/base/remote_gdb.cc
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc
index 7ce37d9..38ddb75 100644
--- a/src/base/remote_gdb.cc
+++ b/src/base/remote_gdb.cc
@@ -922,7 +922,7 @@
 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;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44026
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I283891eadafaa07d12453f085e8a106d59a4f889
Gerrit-Change-Number: 44026
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabe.bl...@gmail.com>
Gerrit-CC: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to