projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8cf71f
)
misc: Adds a warning in case gdb is attached multiple times
author
Alexandru Dutu
<alexandru.dutu@amd.com>
Tue, 4 Oct 2016 17:04:19 +0000
(13:04 -0400)
committer
Alexandru Dutu
<alexandru.dutu@amd.com>
Tue, 4 Oct 2016 17:04:19 +0000
(13:04 -0400)
Instead of scheduling another event, this patch adds a warning in case gdb
is attached multiple times and the first attachement event has not been
processed yet.
src/base/remote_gdb.cc
patch
|
blob
|
history
diff --git
a/src/base/remote_gdb.cc
b/src/base/remote_gdb.cc
index e033bea9c407918a1c1672a4110976ac8c73041b..a22ba9fbe32c3a8296e2b178b83d7e57716e78d2 100644
(file)
--- a/
src/base/remote_gdb.cc
+++ b/
src/base/remote_gdb.cc
@@
-249,6
+249,12
@@
BaseRemoteGDB::InputEvent::InputEvent(BaseRemoteGDB *g, int fd, int e)
void
BaseRemoteGDB::InputEvent::process(int revent)
{
+ if (gdb->trapEvent.scheduled()) {
+ warn("GDB trap event has already been scheduled! "
+ "Ignoring this input event.");
+ return;
+ }
+
if (revent & POLLIN) {
gdb->trapEvent.type(SIGILL);
gdb->scheduleInstCommitEvent(&gdb->trapEvent, 0);