From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Abhijit Halder <abhijit.k.halder@gmail.com>
Subject: Re: Provision for array as debugger variable
Date: Mon, 12 Sep 2011 14:15:00 -0000 [thread overview]
Message-ID: <201109121442.17296.pedro@codesourcery.com> (raw)
In-Reply-To: <CAOhZP9wrPS_fC4OT-Ckb5U3eO0P0ArNWS_ayp+hQKiqtLndhyg@mail.gmail.com>
On Monday 12 September 2011 13:44:15, Abhijit Halder wrote:
> in GDB we can do this to define a debugger variable:
> (gdb) set $var
>
> The $var is a scalar variable. Can we define similarly an array?
(gdb) set $var1 = {0, 1}
(gdb) ptype $var1
type = int [2]
(gdb) p $var1
$1 = {0, 1}
(gdb) set $var2 = (char[2]) {0, 1}
(gdb) ptype $var2
type = char [2]
(gdb) p $var2
$2 = "\000\001"
--
Pedro Alves
next prev parent reply other threads:[~2011-09-12 13:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-12 13:42 Abhijit Halder
2011-09-12 14:15 ` Pedro Alves [this message]
2011-09-12 14:36 ` Abhijit Halder
2011-09-12 15:11 ` Pedro Alves
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=201109121442.17296.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=abhijit.k.halder@gmail.com \
--cc=gdb-patches@sourceware.org \
/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