I am working on Solaris and would like to print stl::string
in dbx.
Which command should I use to print it? print is not working.
Asked
Active
Viewed 1,188 times
-1
-
1You mean `std::string`? – Shoe Aug 04 '15 at 18:36
-
supposedly you are supposed to use [`print *variable*`](http://docs.oracle.com/cd/E18659_01/html/821-1380/blagg.html#blagk) – Fantastic Mr Fox Aug 04 '15 at 18:44
-
yes, sorry for typo. std::string – CrazyC Aug 04 '15 at 18:45
1 Answers
0
Given
std::string str;
This will print the entire object:
(dbx) print str
On Solaris 11.2, using Solaris Studio 12.3, this will print just the value of the std::string
:
(dbx) print str.__data_.__data_

Andrew Henle
- 32,625
- 3
- 24
- 56