[PATCH 1/3] Fortran: Handle associated property of pointer types.
Yao Qi
qiyaoltc@gmail.com
Tue Jun 21 10:04:00 GMT 2016
Bernhard Heckel <bernhard.heckel@intel.com> writes:
>>> +gdb_test "print intp" "= <not associated>" "print intp, not associated"
>>> +
>>> +gdb_breakpoint [gdb_get_line_number "Before pointer assignment"]
>>> +gdb_continue_to_breakpoint "Before pointer assignment"
>>> +gdb_test "print logp" "= <not associated>" "print logp, not associated"
>>> +gdb_test "print comp" "= <not associated>" "print comp, not associated"
>>> +gdb_test "print charp" "= <not associated>" "print charp, not associated"
>>> +gdb_test "print charap" "= <not associated>" "print charap, not associated"
>>> +gdb_test "print intp" "= <not associated>" "print intp, not associated"
>>> +gdb_test "print intap" "= <not associated>" "print intap, not associated"
>>> +gdb_test "print realp" "= <not associated>" "print realp, not associated"
>>> +gdb_test "print \$my_var = intp" "= <not associated>"
>> What is the output without your fix? IMO, "print POINTER" prints the
>> value of the pointer. It doesn't matter whether the pointer is
>> associated with a target or not.
> For compilers creating the property, the output is like above.
> For missing property, it is:
>
> gdb_test "print logp" "= (PTR TO -> ( $logical )) 0x0"
>
> Based on your input I would like to propose:
> gdb_test "print logp" "= (PTR TO -> ( $logical )) <not associated>"
I don't want GDB to carry some knowledge to guess the pointer is not
associated. If compiler creates the property, gdb uses it, otherwise,
simply prints 0x0, which is right to me. I don't understand the point
of changing the output "0x0" -> "<not associated>".
--
Yao (齐尧)
More information about the Gdb-patches
mailing list