This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]