base: Ensure %p format arguments are printed as pointers.
base: Ensure %p format arguments are printed as pointers.

If the %p format is used, char * arguments should be printed as the
hex value of their pointer, not as strings. Unfortunately blindly
passing them to an ostream using << will not do that. This change adds
some casting in that case to ensure that they're treated as numbers and
not as strings.

Change-Id: If02bae6d5e468b352266702fcba62b6beddffcbd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21459
Reviewed-by: Andreas Sandberg <c9f5686ee5bd561c93f9de79681eee75bfa7f36e@arm.com>
Maintainer: Andreas Sandberg <c9f5686ee5bd561c93f9de79681eee75bfa7f36e@arm.com>
Tested-by: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>

gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5,gem5/gem5