From: Andrew STUBBS <andrew.stubbs@st.com>
To: Jim Blandy <jimb@codesourcery.com>
Cc: "'ranjith kumar'" <ranjit_kumar_b4u@yahoo.co.uk>, gdb@sourceware.org
Subject: Re: printing a string
Date: Thu, 10 Jan 2008 10:49:00 -0000 [thread overview]
Message-ID: <4785F82C.1010408@st.com> (raw)
In-Reply-To: <m3k5miljks.fsf@codesourcery.com>
Jim Blandy wrote:
> Andrew STUBBS <andrew.stubbs at st.com> writes:
>> printf "%s\n", mystring
>
> (Not 'set print elements'?)
Well, 'set print elements 0' and 'set print repeats 0' gets you some of
the way there, but line-feeds still get converted to '\n', and if you
want to print shorter strings with x/s then you'll also need 'set print
null-stop on' .....
Basically, if you want to see a string as nature intended then printf
seems to be the easiest way, plus x/s remains useful for viewing the
contents of the string a different way.
Andrew
prev parent reply other threads:[~2008-01-10 10:49 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
2008-01-09 10:50 ` Andrew STUBBS
2008-01-09 22:29 ` Jim Blandy
2008-01-10 10:49 ` Andrew STUBBS [this message]
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=4785F82C.1010408@st.com \
--to=andrew.stubbs@st.com \
--cc=gdb@sourceware.org \
--cc=jimb@codesourcery.com \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).