This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On 08 January 2008 06:06, ranjith kumar wrote:
I know that a variable can be print in gdb by "print var".
But how to print a string???
"print" will display a string, if you're printing a variable of type "char *", or a std::string.
Or you can use "x" (examine) with the "/s" modifier if you just have a memory address.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |