From: "Anmol P. Paralkar" <anmol@freescale.com>
To: ranjith kumar <ranjithproxy@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: size of non local variables
Date: Mon, 30 Nov 2009 23:18:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.0911301423300.12536@lds03-tx32> (raw)
In-Reply-To: <31cff80d0911301216j36328837k673a2e1936f00eb1@mail.gmail.com>
On Tue, 1 Dec 2009, ranjith kumar wrote:
> Hi,
> I know that gdb will print non local variable names and file name in
> which they are defined ,
> when we run 'info variables' command.
>
> Is it possible to print the size of the non local varibles also?
> like the size of 'int global[100]' is 400bytes ...like that????
>
> thanks in advance.
Hello Ranjith Kumar,
You could do:
(gdb) print sizeof(global)
$1 = 400
--
- that's an instance of GDB's functionality to evaluate expressions in the source language with the 'print' command.
See 'Examining Data' in the User Manual: http://sourceware.org/gdb/current/onlinedocs/gdb/Data.html#Data
Best Regards,
Anmol.
next prev parent reply other threads:[~2009-11-30 20:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 20:39 ranjith kumar
2009-11-30 23:18 ` Anmol P. Paralkar [this message]
[not found] ` <31cff80d0911301246p6471c1a5ua95608d22b81a22a@mail.gmail.com>
2009-12-01 0:17 ` Anmol P. Paralkar
2009-12-01 19:26 ` Tom Tromey
2009-12-01 21:33 ` Anmol P. Paralkar
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=Pine.LNX.4.64.0911301423300.12536@lds03-tx32 \
--to=anmol@freescale.com \
--cc=gdb@sourceware.org \
--cc=ranjithproxy@gmail.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