This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
set $argv = *argv@100
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: gdb at sources dot redhat dot com
- Date: Tue, 12 Feb 2002 00:47:53 -0500
- Subject: set $argv = *argv@100
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?
Contrast it with:
(top-gdb) print args
$9 = {func = 0x804d498 <captured_main>, func_args = 0xbfbfd8d4}
(top-gdb) set $a = args
(top-gdb) print $a
$10 = {func = 0x804d498 <captured_main>, func_args = 0xbfbfd8d4}
puzzled.
Andrew