set $argv = *argv@100

Andrew Cagney ac131313@cygnus.com
Mon Feb 11 21:48:00 GMT 2002


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



More information about the Gdb mailing list