changeset 1f12c11d89b6 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=1f12c11d89b6
description:
        mem: Provide better diagnostic for unconnected port

        When _masterPort is null, a message to that effect is
        more helpful than a segfault.

diffstat:

 src/mem/port.hh |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (16 lines):

diff -r 6400a2ab4e22 -r 1f12c11d89b6 src/mem/port.hh
--- a/src/mem/port.hh   Sat Sep 27 09:08:29 2014 -0400
+++ b/src/mem/port.hh   Sat Sep 27 09:08:30 2014 -0400
@@ -404,7 +404,11 @@
     /**
      * 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
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to