From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Cagney <ac131313@cygnus.com>, gdb@sources.redhat.com
Subject: Re: set $argv = *argv@100
Date: Mon, 11 Feb 2002 22:22:00 -0000 [thread overview]
Message-ID: <1020212062154.ZM31975@localhost.localdomain> (raw)
In-Reply-To: Andrew Cagney <ac131313@cygnus.com> "set $argv = *argv@100" (Feb 12, 12:47am)
On Feb 12, 12:47am, Andrew Cagney wrote:
> Consider the sequence:
>
> (top-gdb) print argv
> $4 = (char **) 0xbfbfd3cc
> (top-gdb) set $argv = *argv@100
> (top-gdb) print $argv
> $5 = (char **) 0xbfbfd3cc
> (top-gdb) print sizeof ($argv)
> $6 = 0x4
> (top-gdb) print sizeof (*argv@100)
> $7 = 0x190
>
> should $argv have been assigned the contents of *argv@100 or just the
> address?
I think the address is right. The problem is that $argv isn't the right
type. According to the above, it's ``char **'' when it should be
``char *[100]''.
Try this:
(top-gdb) set $argva = &(*argv@100)
(top-gdb) print $argva
$23 = (char *(*)[100]) 0xbffff99c
(top-gdb) ptype $argva
type = char *(*)[100]
(top-gdb) ptype *$argva
type = char *[100]
Kevin
next prev parent reply other threads:[~2002-02-12 6:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-11 21:48 Andrew Cagney
2002-02-11 22:22 ` Kevin Buettner [this message]
2002-02-12 7:32 ` Andrew Cagney
2002-02-12 8:33 ` Kevin Buettner
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=1020212062154.ZM31975@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=ac131313@cygnus.com \
--cc=gdb@sources.redhat.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