d-iii-s / msim

Light-weight MIPS R4000 and RISC-V system simulator
https://d3s.mff.cuni.cz/software/msim/
GNU General Public License v2.0
5 stars 4 forks source link

Prevent having more devices with the same name #32

Closed vhotspur closed 1 year ago

vhotspur commented 1 year ago

Following should raise an error and second device should not be added.

echo -e "add dr4kcpu one\nadd rwm one 0x0\ndumpdev" | ./msim

Instead, dumpdev prints the following:

[  name  ] [  type  ] [ parameters...
one        dr4kcpu    R4000
one        rwm        [Start    ] [Size      ] [Type]
00000000000            0 none