Gabe Black has submitted this change. ( 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
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44026
Reviewed-by: Boris Shingarov <[email protected]>
Reviewed-by: Daniel Carvalho <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/base/remote_gdb.cc
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Boris Shingarov: Looks good to me, approved
  Daniel Carvalho: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



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: 2
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Boris Shingarov <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to