61a62,63
> #include <limits>
>
244a247,263
>
> /**
> * Reads the string at guest address addr into the char * str, reading up
> * to maxlen characters. The last character read is always a nul
> * terminator. Returns true on success and false on failure.
> */
> bool tryReadString(char *str, Addr addr, size_t maxlen) const;
>
> /**
> * Same as tryReadString, but insists on success.
> */
> void
> readString(char *str, Addr addr, size_t maxlen) const
> {
> if (!tryReadString(str, addr, maxlen))
> fatal("readString(%#x, ...) failed", addr);
> }