From: Daniel Jacobowitz <drow@mvista.com>
To: "Fyles, Matthew" <matthew.fyles@superh.com>
Cc: gdb@sources.redhat.com
Subject: Re: String handling in GDB command language variables
Date: Thu, 27 Feb 2003 14:23:00 -0000 [thread overview]
Message-ID: <20030227142315.GA3266@nevyn.them.org> (raw)
In-Reply-To: <9FF3133289A7A84E81E2ED8F5E56B379537D94@sh-uk-ex01.uk.w2k.superh.com>
On Thu, Feb 27, 2003 at 09:13:55AM -0000, Fyles, Matthew wrote:
> Just a quick question about the string handling capability of the GDB
> command language.
>
> set $test="mystring" does not work but defining a procedure and passing
> a string in as an argument does, is there any further documentation
> anywhere about the capabilities of the language other than the
> information available in the user documentation.
>
> Is this a feature that has been considered in the past and not
> implemented or am I just not understanding the syntax for achieving
> this.
When you say "mystring" in the GDB command language, what you really
get is malloc(9) called in the target program and "mystring" copied
into it.
However, you didn't say what version of GDB you were using. I just
tried it in 5.3:
(gdb) set $a = "a"
(gdb) p $a
$1 = 0x8244708 "a"
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-02-27 14:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-27 9:13 Fyles, Matthew
2003-02-27 14:23 ` Daniel Jacobowitz [this message]
2003-02-27 14:35 Fyles, Matthew
2003-02-27 14:40 ` Daniel Jacobowitz
2003-02-27 16:43 ` Andrew Cagney
2003-02-27 19:06 ` Daniel Jacobowitz
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=20030227142315.GA3266@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb@sources.redhat.com \
--cc=matthew.fyles@superh.com \
/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