Jan Vrany has uploaded this change for review. (
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
---
M src/base/remote_gdb.cc
M src/base/remote_gdb.hh
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc
index e57ded7..b620b99 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.
@@ -481,15 +481,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());
@@ -514,7 +514,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.
@@ -522,7 +522,7 @@
regCachePtr->getRegs(tc);
GdbCommand::Context cmd_ctx;
- cmd_ctx.type = type;
+ cmd_ctx.type = signum;
std::vector<char> data;
for (;;) {
@@ -559,8 +559,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: 1
Gerrit-Owner: Jan Vrany <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s