projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de62aed
)
mem: Provide better diagnostic for unconnected port
author
Curtis Dunham
<Curtis.Dunham@arm.com>
Sat, 27 Sep 2014 13:08:30 +0000
(09:08 -0400)
committer
Curtis Dunham
<Curtis.Dunham@arm.com>
Sat, 27 Sep 2014 13:08:30 +0000
(09:08 -0400)
When _masterPort is null, a message to that effect is
more helpful than a segfault.
src/mem/port.hh
patch
|
blob
|
history
diff --git
a/src/mem/port.hh
b/src/mem/port.hh
index 8fefb2f3afead9d0c3f125b353df500d17f6ca49..28f4d7d687e2181bf3a4b1a38f95b2b537a89ea3 100644
(file)
--- a/
src/mem/port.hh
+++ b/
src/mem/port.hh
@@
-404,7
+404,11
@@
class SlavePort : public BaseSlavePort
/**
* Called by the owner to send a range change
*/
- void sendRangeChange() const { _masterPort->recvRangeChange(); }
+ void sendRangeChange() const {
+ if (!_masterPort)
+ fatal("%s cannot sendRangeChange() without master port", name());
+ _masterPort->recvRangeChange();
+ }
/**
* Get a list of the non-overlapping address ranges the owner is