Jan Vrany has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/48180 )
Change subject: base: Change prototype of BaseRemoteGDB::trap()
......................................................................
base: Change prototype of BaseRemoteGDB::trap()
Change the return type of BaseRemoteGDB::trap() to void since the
return value was never used by any of the callers. Also change the
name of second parameter to signum since its value is reported back
to GDB in "S" packet.
Change-Id: I81acfac24ffe62e4ffae6b74bf33f1f07ada3ca7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48180
Reviewed-by: Gabe Black <[email protected]>
Maintainer: Gabe Black <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/base/remote_gdb.cc
M src/base/remote_gdb.hh
2 files changed, 9 insertions(+), 11 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc
index 3a654b1..61a26b0 100644
--- a/src/base/remote_gdb.cc
+++ b/src/base/remote_gdb.cc
@@ -10,7 +10,7 @@
* unmodified and in its entirety in all distributions of the software,
* modified or unmodified, in source code or in binary form.
*
- * Copyright 2015 LabWare
+ * Copyright 2015, 2021 LabWare
* Copyright 2014 Google, Inc.
* Copyright (c) 2002-2005 The Regents of The University of Michigan
* All rights reserved.
@@ -483,15 +483,15 @@
// present, but might eventually become meaningful. (XXX) It might
// makes sense to use POSIX errno values, because that is what the
// gdb/remote.c functions want to return.
-bool
-BaseRemoteGDB::trap(ContextID id, int type)
+void
+BaseRemoteGDB::trap(ContextID id, int signum)
{
if (!attached)
- return false;
+ return;
if (tc->contextId() != id) {
if (!selectThreadContext(id))
- return false;
+ return;
}
DPRINTF(GDBMisc, "trap: PC=%s\n", tc->pcState());
@@ -516,7 +516,7 @@
send("OK");
} else {
// Tell remote host that an exception has occurred.
- send("S%02x", type);
+ send("S%02x", signum);
}
// Stick frame regs into our reg cache.
@@ -524,7 +524,7 @@
regCachePtr->getRegs(tc);
GdbCommand::Context cmd_ctx;
- cmd_ctx.type = type;
+ cmd_ctx.type = signum;
std::vector<char> data;
for (;;) {
@@ -561,8 +561,6 @@
panic("Unrecognzied GDB exception.");
}
}
-
- return true;
}
void
diff --git a/src/base/remote_gdb.hh b/src/base/remote_gdb.hh
index 1089607..7d8305b 100644
--- a/src/base/remote_gdb.hh
+++ b/src/base/remote_gdb.hh
@@ -10,7 +10,7 @@
* unmodified and in its entirety in all distributions of the software,
* modified or unmodified, in source code or in binary form.
*
- * Copyright 2015 LabWare
+ * Copyright 2015, 2021 LabWare
* Copyright 2014 Google, Inc.
* Copyright (c) 2002-2005 The Regents of The University of Michigan
* All rights reserved.
@@ -171,7 +171,7 @@
void replaceThreadContext(ThreadContext *_tc);
bool selectThreadContext(ContextID id);
- bool trap(ContextID id, int type);
+ void trap(ContextID id, int signum);
/** @} */ // end of api_remote_gdb
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48180
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: I81acfac24ffe62e4ffae6b74bf33f1f07ada3ca7
Gerrit-Change-Number: 48180
Gerrit-PatchSet: 2
Gerrit-Owner: Jan Vrany <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Boris Shingarov <[email protected]>
Gerrit-Reviewer: Ciro Santilli <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jan Vrany <[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