|
The cprintf functions don't know ahead of time what format characters
are going to be used with what underlying data types, and so any
type must be minimally usable with the default specialization of
format_integer, format_char, format_float and format_string. All of
those functions ultimately print their parameter with out << data
except the one which prints stringstreams. That function accesses the
buffer of the string stream with .str(), and then prints that instead.
That should technically work out ok as long as stringstreams are only
printed using %s, but there's no way to guarantee that ahead of time.
To avoid that problem, and because gem5 doesn't ever actually use the
ability to print stringstreams directly, this change removes that
feature and modifies the corresponding part of the unit test.
If we ever do want to print the contents of a string stream, it won't
be difficult to add a .str() to it.
Change-Id: Id902eaff042b96b374efe0183e5e3be9626e8c88
Reviewed-on: https://gem5-review.googlesource.com/7642
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Gabe Black <gabeblack@google.com>
|