From: "Dave Korn" <dave.korn@artimi.com>
To: "'ranjith kumar'" <ranjit_kumar_b4u@yahoo.co.uk>, <gdb@sourceware.org>
Subject: RE: printing a string
Date: Tue, 08 Jan 2008 15:36:00 -0000 [thread overview]
Message-ID: <003701c8520c$2842c9d0$2e08a8c0@CAM.ARTIMI.COM> (raw)
In-Reply-To: <509320.35245.qm@web27407.mail.ukl.yahoo.com>
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.
cheers,
DaveK
--
Can't think of a witty .sigline today....
next prev parent reply other threads:[~2008-01-08 15:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 6:06 ranjith kumar
2008-01-08 15:36 ` Dave Korn [this message]
2008-01-09 10:50 ` Andrew STUBBS
2008-01-09 22:29 ` Jim Blandy
2008-01-10 10:49 ` Andrew STUBBS
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='003701c8520c$2842c9d0$2e08a8c0@CAM.ARTIMI.COM' \
--to=dave.korn@artimi.com \
--cc=gdb@sourceware.org \
--cc=ranjit_kumar_b4u@yahoo.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox