From: Andrew Cagney <ac131313@cygnus.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: set $argv = *argv@100
Date: Tue, 12 Feb 2002 07:32:00 -0000 [thread overview]
Message-ID: <3C69357A.4030805@cygnus.com> (raw)
In-Reply-To: <1020212062154.ZM31975@localhost.localdomain>
>
> 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
Yes, C strikes again. You can't copy an array, just its address :-(
sigh,
Andrew
next prev parent reply other threads:[~2002-02-12 15:32 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
2002-02-12 7:32 ` Andrew Cagney [this message]
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=3C69357A.4030805@cygnus.com \
--to=ac131313@cygnus.com \
--cc=gdb@sources.redhat.com \
--cc=kevinb@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