summaryrefslogtreecommitdiff
path: root/src/mem/port.hh
diff options
context:
space:
mode:
authorCurtis Dunham <Curtis.Dunham@arm.com>2014-09-27 09:08:30 -0400
committerCurtis Dunham <Curtis.Dunham@arm.com>2014-09-27 09:08:30 -0400
commit725be98fe8002b897e137db26453754152f41606 (patch)
tree064147a6153c29b71a1498d88032121d38358d2b /src/mem/port.hh
parentde62aedabc96e7492c40bbc4468ba42b3274bfd6 (diff)
downloadgem5-725be98fe8002b897e137db26453754152f41606.tar.xz
mem: Provide better diagnostic for unconnected port
When _masterPort is null, a message to that effect is more helpful than a segfault.
Diffstat (limited to 'src/mem/port.hh')
-rw-r--r--src/mem/port.hh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mem/port.hh b/src/mem/port.hh
index 8fefb2f3a..28f4d7d68 100644
--- 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